1 USING: accessors sequences assocs kernel quotations namespaces
2 xml.data xml.traversal combinators macros parser lexer words fry ;
5 : implies ( x y -- z ) [ not ] dip or ; inline
7 : map-find ( seq quot -- result elt )
10 [ [ drop f ] unless ] dip ; inline
12 : tag-init-form ( spec -- quot )
14 { [ dup quotation? ] [ [ object get tag get ] prepose ] }
15 { [ dup length 2 = ] [
17 tag get children>string
18 _ [ execute ] when* object get _ execute
21 { [ dup length 3 = ] [
24 _ [ execute ] when* object get _ execute
29 : with-tag-initializer ( tag obj quot -- )
30 [ object set tag set ] prepose with-scope ; inline
32 MACRO: (init-from-tag) ( specs -- )
33 [ tag-init-form ] map concat [ ] like
34 [ with-tag-initializer ] curry ;
36 : init-from-tag ( tag tuple specs -- tuple )
37 over [ (init-from-tag) ] dip ; inline