combinators.extras: adding 3bi* and 3bi@.
parent
16d24a5194
commit
1bf876fc06
|
@ -23,3 +23,7 @@ IN: combinators.extras.tests
|
|||
] unit-test
|
||||
|
||||
{ { 1 2 3 } } [ 1 { [ ] [ 1 + ] [ 2 + ] } cleave-array ] unit-test
|
||||
|
||||
{ 2 15 } [ 1 2 3 4 5 6 [ - - ] [ + + ] 3bi* ] unit-test
|
||||
|
||||
{ 2 5 } [ 1 2 3 4 5 6 [ - - ] 3bi@ ] unit-test
|
||||
|
|
|
@ -18,3 +18,9 @@ MACRO: cond-case ( assoc -- )
|
|||
|
||||
MACRO: cleave-array ( quots -- )
|
||||
[ '[ _ cleave ] ] [ length '[ _ narray ] ] bi compose ;
|
||||
|
||||
: 3bi* ( u v w x y z p q -- )
|
||||
[ 3dip ] dip call ; inline
|
||||
|
||||
: 3bi@ ( u v w x y z quot -- )
|
||||
dup 3bi* ; inline
|
||||
|
|
Loading…
Reference in New Issue