2 USING: kernel parser math quotations namespaces sequences macros fry ;
6 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8 : [set-parameters] ( seq -- quot ) reverse [ [ set ] curry ] map concat ;
10 MACRO: set-parameters ( seq -- quot ) [set-parameters] ;
12 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14 : parametric-quot ( parameters quot -- quot ) '[ _ set-parameters _ call ] ;
16 : scoped-quot ( quot -- quot ) '[ _ with-scope ] ;
18 : closed-quot ( quot -- quot )
19 namestack swap '[ namestack [ _ set-namestack @ ] dip set-namestack ] ;
21 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
23 : lambda ( parameters quot -- quot ) parametric-quot scoped-quot closed-quot ;
25 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27 : C[ \ ] [ >quotation ] parse-literal \ closed-quot parsed ; parsing