From e4de6fd8af593ec09cd3e2d40dee542c71313742 Mon Sep 17 00:00:00 2001 From: Daniel Ehrenberg <ehrenbed@carleton.edu> Date: Wed, 9 Jan 2008 13:44:58 -0600 Subject: [PATCH] Changing combinators.lib --- extra/combinators/lib/lib.factor | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extra/combinators/lib/lib.factor b/extra/combinators/lib/lib.factor index a24e7bd791..94d13a828c 100644 --- a/extra/combinators/lib/lib.factor +++ b/extra/combinators/lib/lib.factor @@ -166,3 +166,6 @@ MACRO: construct-slots ( assoc tuple-class -- tuple ) [ construct-empty ] curry swap [ [ dip ] curry swap 1quotation [ keep ] curry compose ] { } assoc>map concat compose ; + +: either ( object first second -- ? ) + >r over slip swap [ r> drop ] [ r> call ] ?if ; inline