Rename spread>quot to deep-spread>quot, and spread>quot-shallow to shallow-spread>quot.

db4
Doug Coleman 2011-10-02 20:25:39 -07:00
parent c4418e637e
commit 8504b17aad
6 changed files with 9 additions and 9 deletions

View File

@ -95,7 +95,7 @@ INSTANCE: fried-callable fried
check-fry mark-composes check-fry mark-composes
{ _ } split convert-curries { _ } split convert-curries
[ [ [ ] ] [ [ ] (make-curry) but-last ] if-zero ] [ [ [ ] ] [ [ ] (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 DEFER: dredge-fry

View File

@ -40,7 +40,7 @@ M: object localize 1quotation ;
[ [ ] ] [ [ [ ] ] [
dup [ local-reader? ] any? [ dup [ local-reader? ] any? [
dup [ local-reader? [ 1array ] [ ] ? ] map dup [ local-reader? [ 1array ] [ ] ? ] map
spread>quot deep-spread>quot
] [ [ ] ] if swap length [ load-locals ] curry append ] [ [ ] ] if swap length [ load-locals ] curry append
] if-empty ; ] if-empty ;

View File

@ -24,7 +24,7 @@ TUPLE: alien-assembly-params < alien-node-params { quot callable } ;
TUPLE: alien-callback-params < alien-node-params xt ; TUPLE: alien-callback-params < alien-node-params xt ;
: param-prep-quot ( params -- quot ) : 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 -- ) : alien-stack ( params extra -- )
over parameters>> length + consume-d >>in-d over parameters>> length + consume-d >>in-d
@ -117,7 +117,7 @@ TUPLE: alien-callback-params < alien-node-params xt ;
: callback-parameter-quot ( params -- quot ) : callback-parameter-quot ( params -- quot )
parameters>> [ c-type ] map parameters>> [ c-type ] map
[ [ c-type-class ] map '[ _ declare ] ] [ [ c-type-class ] map '[ _ declare ] ]
[ [ c-type-boxer-quot ] map spread>quot ] [ [ c-type-boxer-quot ] map deep-spread>quot ]
bi append ; bi append ;
GENERIC: wrap-callback-quot ( params quot -- quot' ) GENERIC: wrap-callback-quot ( params quot -- quot' )

View File

@ -87,7 +87,7 @@ IN: stack-checker.transforms
\ 3cleave t "no-compile" set-word-prop \ 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 \ spread t "no-compile" set-word-prop

View File

@ -134,7 +134,7 @@ M: class final-class? drop t ;
superclasses [ "slots" word-prop length ] map-sum ; superclasses [ "slots" word-prop length ] map-sum ;
: boa-check-quot ( class -- quot ) : 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 ; f like ;
: define-boa-check ( class -- ) : define-boa-check ( class -- )

View File

@ -65,14 +65,14 @@ SLOT: terminated?
[ [ 3keep ] curry ] map concat [ 3drop ] append [ ] like ; [ [ 3keep ] curry ] map concat [ 3drop ] append [ ] like ;
! spread ! spread
: spread>quot-shallow ( seq -- quot ) : shallow-spread>quot ( seq -- quot )
[ ] [ [ dup empty? [ [ dip ] curry ] unless ] dip append ] reduce ; [ ] [ [ dup empty? [ [ dip ] curry ] unless ] dip append ] reduce ;
: spread>quot ( seq -- quot ) : deep-spread>quot ( seq -- quot )
[ ] [ [ [ dip ] curry ] dip append ] reduce ; [ ] [ [ [ dip ] curry ] dip append ] reduce ;
: spread ( objs... seq -- ) : spread ( objs... seq -- )
spread>quot call ; deep-spread>quot call ;
! cond ! cond
ERROR: no-cond ; ERROR: no-cond ;