13 /* multline ( x -- y )
15 6 /* something else */ 2 +
19 USING: vocabularies ... ;
23 FROM: vocab => words ... ;
24 EXCLUDE: vocab => words ... ;
26 QUALIFIED-WITH: vocab word-prefix
27 RENAME: word vocab => new-name
28 ALIAS: new-word existing-word
36 TUPLE: class slots ... ;
37 TUPLE: class < superclass slots ... ;
38 BUILTIN: class slots ... ;
39 INSTANCE: instance mixin
41 SINGLETONS: words ... ;
42 PREDICATE: class < superclass predicate... ;
46 TUPLE: interval-map { array array read-only } ;
47 BUILTIN: string { length array-capacity read-only initial: 0 } aux ;
51 : word ( x -- ) drop ;
52 :: word ( x -- ) x drop ;
53 TYPED: word ( a b: class ... -- x: class y ... ) body ;
54 TYPED:: word ( a b: class ... -- x: class y ... ) body ;
55 MACRO: word ( inputs... -- ) definition... ) ;
56 MACRO:: word ( vars... -- outputs... ) definition... ) ;
57 M: class generic (definition) ... ;
58 M:: class generic ( vars... -- outputs... ) body... ;
59 GENERIC: word ( stack -- effect )
60 HOOK: word variable ( stack -- effect )
61 GENERIC#: word 1 ( stack -- effect )
62 MATH: + ( x y -- z ) foldable flushable
70 : word ( x -- ) drop ;
71 :: word ( x -- ) x drop ;
72 TYPED: word ( a b: class ... -- x: class y ... ) body ;
73 TYPED:: word ( a b: class ... -- x: class y ... ) body ;
74 MACRO: word ( inputs... -- ) definition... ) ;
75 MACRO:: word ( vars... -- outputs... ) definition... ) ;
76 M: class generic (definition) ... ;
77 M:: class generic ( vars... -- outputs... ) body... ;
78 GENERIC: word ( stack -- effect )
79 HOOK: word variable ( stack -- effect )
80 GENERIC#: word 1 ( stack -- effect )
81 MATH: + ( x y -- z ) foldable flushable
92 ENUM: type < base-type words...
93 FUNCTION: return name ( parameters ) ;
94 FUNCTION-ALIAS: factor-name return name ( parameters ) ;
96 ! Symbols and literals
139 "\a\b\e\f\n\r\t\s\v\s\0\\\""
142 URL" http://google.com"
147 ! Triple quote strings (old Factor)
156 [=[this is a weird new string]=]
177 ! Symbols are colored wrong:
179 : rock ( -- ) \ rock computer play. ;
181 ! SBUF is colored wrong:
183 SBUF" " clone swap [ " " append ] [ number>string append ] interleave
185 ! Update to new library words:
187 key? and assoc-empty? are not colored
188 tail* is not highlighted
190 ! IN poker, unicode characters:
198 CHAR: symbol-for-end-of-transmission
206 ! New number literals:
248 ! Comments in STRUCT: definitions
249 ! STRUCT: features like bitfields, etc.
252 { a int initial: 0 } ! a comment
267 ( quot: ( a -- b ) -- )
268 ( x quot: ( a -- b ) -- y )
269 ( ..a quot: ( ..a x -- ..b ) -- ..b )
273 ( m: integer -- n: float )
274 ( :integer -- :float )
290 : foo ( x -- y ) foo>> + ; inline
310 ! Regexp is colored wrong (on Github):
312 : using-line ( source -- vocabs )
313 R/ USING: [^;]* ;/s all-matching-subseqs ?first
314 [ { } ] [ " \n" split rest but-last ] if-empty ;