Changing combinators.lib

db4
Daniel Ehrenberg 2008-01-09 13:44:58 -06:00
parent d1aba5effe
commit e4de6fd8af
1 changed files with 3 additions and 0 deletions

View File

@ -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