2 USING: kernel words namespaces arrays vectors hashtables
3 sequences assocs sets grouping
4 combinators.conditional
5 combinators.short-circuit
10 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12 : properties ( -- properties ) V{ } ;
14 SYM: self properties adjoin
15 SYM: type properties adjoin
16 SYM: title properties adjoin
18 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
20 : types ( -- types ) V{ } ;
22 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
24 : >obj ( val -- obj ) [ symbol? ] [ get ] [ ] 1if ;
26 : -> ( obj pro -- val ) swap >obj at ;
28 PREDICATE: obj < alist { [ self -> ] [ type -> ] } 1&& ;
30 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
32 : objects ( -- objects ) V{ } ;
34 : define-object ( symbol table -- )
36 self rot 2array prefix
37 dup dup self -> set-global
38 self -> objects adjoin ;
40 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
42 PREDICATE: ptr < symbol get obj? ;
44 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!