factor/extra/combinators/short-circuit/smart/smart.factor

12 lines
305 B
Factor
Raw Normal View History

2008-06-24 11:40:55 -04:00
USING: kernel sequences math inference accessors macros
combinators.short-circuit ;
IN: combinators.short-circuit.smart
MACRO: && ( quots -- quot )
dup first infer [ in>> ] [ out>> ] bi - 1+ n&&-rewrite ;
MACRO: || ( quots -- quot )
dup first infer [ in>> ] [ out>> ] bi - 1+ n||-rewrite ;