2 USING: kernel parser math quotations namespaces sequences macros
7 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9 : [set-parameters] ( seq -- quot ) reverse [ [ set ] curry ] map concat ;
11 MACRO: set-parameters ( seq -- quot ) [set-parameters] ;
13 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15 : parametric-quot ( parameters quot -- quot ) '[ , set-parameters , call ] ;
17 : scoped-quot ( quot -- quot ) '[ , with-scope ] ;
19 : closed-quot ( quot -- quot )
20 namestack swap '[ namestack [ , set-namestack @ ] dip set-namestack ] ;
22 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
24 : lambda ( parameters quot -- quot ) parametric-quot scoped-quot closed-quot ;
26 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28 : C[ \ ] [ >quotation ] parse-literal \ closed-quot parsed ; parsing