Revert "spread>quot now outputs empty quotations where you would expect so that things like { [ ] [ ] } spread infer as ( x x -- x x ) instead of ( -- )"
This causes problems in bootstrap and in make-images. Revisit sometime in the future...
This reverts commit 004b20df12
.
db4
parent
15f44a7276
commit
f6bdebb36b
|
@ -1,6 +1,6 @@
|
|||
USING: alien strings kernel math tools.test io prettyprint
|
||||
namespaces combinators words classes sequences accessors
|
||||
math.functions arrays combinators.private stack-checker ;
|
||||
math.functions arrays combinators.private ;
|
||||
IN: combinators.tests
|
||||
|
||||
[ 3 ] [ 1 2 [ + ] call( x y -- z ) ] unit-test
|
||||
|
@ -320,7 +320,3 @@ DEFER: corner-case-1
|
|||
|
||||
[ "nachos" ] [ 33 test-case-12 ] unit-test
|
||||
[ "nachos" ] [ 33 \ test-case-12 def>> call ] unit-test
|
||||
|
||||
! Fixes #138
|
||||
[ { 3 3 } ]
|
||||
[ [ { [ ] [ ] [ ] } spread ] [ inputs ] [ outputs ] bi 2array ] unit-test
|
|
@ -66,7 +66,7 @@ SLOT: terminated?
|
|||
|
||||
! spread
|
||||
: spread>quot ( seq -- quot )
|
||||
[ ] [ [ [ dip ] curry ] dip append ] reduce ;
|
||||
[ ] [ [ dup empty? [ [ dip ] curry ] unless ] dip append ] reduce ;
|
||||
|
||||
: spread ( objs... seq -- )
|
||||
spread>quot call ;
|
||||
|
|
Loading…
Reference in New Issue