]> gitweb.factorcode.org Git - factor.git/blob - basis/alias/alias-docs.factor
Minor doc clarification
[factor.git] / basis / alias / alias-docs.factor
1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel words help.markup help.syntax ;
4 IN: alias
5
6 HELP: ALIAS:
7 { $syntax "ALIAS: new-word existing-word" }
8 { $values { "new-word" word } { "existing-word" word } }
9 { $description "Creates a " { $snippet "new" } " inlined word that calls the " { $snippet "existing" } " word." }
10 { $examples
11     { $example "USING: alias prettyprint sequences ;"
12                "IN: alias.test"
13                "ALIAS: sequence-nth nth"
14                "0 { 10 20 30 } sequence-nth ."
15                "10"
16     }
17 } ;
18
19 ARTICLE: "alias" "Word aliasing"
20 "The " { $vocab-link "alias" } " vocabulary implements a way to make many different names for the same word. Although creating new names for words is generally frowned upon, aliases are useful for the Win32 API and other cases where words need to be renamed for symmetry." $nl 
21 "Make a new word that aliases another word:"
22 { $subsection define-alias }
23 "Make an alias at parse-time:"
24 { $subsection POSTPONE: ALIAS: } ;
25
26 ABOUT: "alias"