Fix smart-if* for multiple inputs and test. oops

db4
Doug Coleman 2010-04-29 20:21:53 -05:00
parent 79a3b71f47
commit 242f8490c5
2 changed files with 4 additions and 1 deletions

View File

@ -73,3 +73,6 @@ IN: combinators.smart.tests
[ ] [ 3 [ even? ] [ 2 + ] smart-when* ] unit-test
[ 3 ] [ 2 [ odd? ] [ 3 ] smart-unless* ] unit-test
[ 3 ] [ 3 [ odd? ] [ 5 ] smart-unless* ] unit-test
[ -1 ] [ 1 2 [ + odd? ] [ - ] smart-when* ] unit-test
[ ] [ 2 2 [ + odd? ] [ ] smart-unless* ] unit-test

View File

@ -50,7 +50,7 @@ MACRO: nullary ( quot -- quot' )
dup outputs '[ @ _ ndrop ] ;
MACRO: dropping ( quot -- quot' )
outputs '[ [ _ ndrop ] ] ;
inputs '[ [ _ ndrop ] ] ;
MACRO: balancing ( quot -- quot' )
'[ _ [ preserving ] [ dropping ] bi ] ;