From 9b3fa8407bb69fd65a0fdd6e76e770172a078ac0 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 23 Sep 2013 16:51:31 -0700 Subject: [PATCH] combinators.extras: adding 4bi and 4tri. --- extra/combinators/extras/extras.factor | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extra/combinators/extras/extras.factor b/extra/combinators/extras/extras.factor index 6222b8920e..8c6c281c18 100644 --- a/extra/combinators/extras/extras.factor +++ b/extra/combinators/extras/extras.factor @@ -27,6 +27,12 @@ MACRO: cleave-array ( quots -- ) : 3bi@ ( u v w x y z quot -- ) dup 3bi* ; inline +: 4bi ( w x y z p q -- ) + [ 4keep ] dip call ; inline + +: 4tri ( w x y z p q r -- ) + [ [ 4keep ] dip 4keep ] dip call ; inline + : keepd ( ..a x y quot: ( ..a x y -- ..b ) -- ..b x ) 2keep drop ; inline