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