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
71 ENUM: type < base-type words...
72 FUNCTION: return name ( parameters ) ;
73 FUNCTION-ALIAS: factor-name return name ( parameters ) ;
75 ! Symbols and literals
118 "\a\b\e\f\n\r\t\s\v\s\0\\\""
121 URL" http://google.com"
126 ! Triple quote strings (old Factor)
135 [=[this is a weird new string]=]
156 ! Symbols are colored wrong:
158 : rock ( -- ) \ rock computer play. ;
160 ! SBUF is colored wrong:
162 SBUF" " clone swap [ " " append ] [ number>string append ] interleave
164 ! Update to new library words:
166 key? and assoc-empty? are not colored
167 tail* is not highlighted
169 ! IN poker, unicode characters:
177 CHAR: symbol-for-end-of-transmission
185 ! New number literals:
227 ! Comments in STRUCT: definitions
228 ! STRUCT: features like bitfields, etc.
231 { a int initial: 0 } ! a comment
246 ( quot: ( a -- b ) -- )
247 ( x quot: ( a -- b ) -- y )
248 ( ..a quot: ( ..a x -- ..b ) -- ..b )
252 ( m: integer -- n: float )
253 ( :integer -- :float )
269 : foo ( x -- y ) foo>> + ; inline
289 ! Regexp is colored wrong (on Github):
291 : using-line ( source -- vocabs )
292 R/ USING: [^;]* ;/s all-matching-subseqs ?first
293 [ { } ] [ " \n" split rest but-last ] if-empty ;