USING: alien strings kernel math tools.test io prettyprint
namespaces combinators words classes sequences accessors
-math.functions arrays combinators.private ;
+math.functions arrays combinators.private stack-checker ;
IN: combinators.tests
[ 3 ] [ 1 2 [ + ] call( x y -- z ) ] unit-test
[ "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
\ No newline at end of file
! spread
: spread>quot ( seq -- quot )
- [ ] [ [ dup empty? [ [ dip ] curry ] unless ] dip append ] reduce ;
+ [ ] [ [ [ dip ] curry ] dip append ] reduce ;
: spread ( objs... seq -- )
spread>quot call ;