check-fry mark-composes
{ _ } split convert-curries
[ [ [ ] ] [ [ ] (make-curry) but-last ] if-zero ]
- [ spread>quot-shallow swap [ [ ] (make-curry) compose ] unless-zero ] if-empty ;
+ [ shallow-spread>quot swap [ [ ] (make-curry) compose ] unless-zero ] if-empty ;
DEFER: dredge-fry
[ [ ] ] [
dup [ local-reader? ] any? [
dup [ local-reader? [ 1array ] [ ] ? ] map
- spread>quot
+ deep-spread>quot
] [ [ ] ] if swap length [ load-locals ] curry append
] if-empty ;
TUPLE: alien-callback-params < alien-node-params xt ;
: param-prep-quot ( params -- quot )
- parameters>> [ c-type c-type-unboxer-quot ] map spread>quot ;
+ parameters>> [ c-type c-type-unboxer-quot ] map deep-spread>quot ;
: alien-stack ( params extra -- )
over parameters>> length + consume-d >>in-d
: callback-parameter-quot ( params -- quot )
parameters>> [ c-type ] map
[ [ c-type-class ] map '[ _ declare ] ]
- [ [ c-type-boxer-quot ] map spread>quot ]
+ [ [ c-type-boxer-quot ] map deep-spread>quot ]
bi append ;
GENERIC: wrap-callback-quot ( params quot -- quot' )
\ 3cleave t "no-compile" set-word-prop
-\ spread [ spread>quot ] 1 define-transform
+\ spread [ deep-spread>quot ] 1 define-transform
\ spread t "no-compile" set-word-prop
superclasses [ "slots" word-prop length ] map-sum ;
: boa-check-quot ( class -- quot )
- all-slots [ class>> instance-check-quot ] map spread>quot-shallow
+ all-slots [ class>> instance-check-quot ] map shallow-spread>quot
f like ;
: define-boa-check ( class -- )
[ [ 3keep ] curry ] map concat [ 3drop ] append [ ] like ;
! spread
-: spread>quot-shallow ( seq -- quot )
+: shallow-spread>quot ( seq -- quot )
[ ] [ [ dup empty? [ [ dip ] curry ] unless ] dip append ] reduce ;
-: spread>quot ( seq -- quot )
+: deep-spread>quot ( seq -- quot )
[ ] [ [ [ dip ] curry ] dip append ] reduce ;
: spread ( objs... seq -- )
- spread>quot call ;
+ deep-spread>quot call ;
! cond
ERROR: no-cond ;