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

12 lines
309 B
Factor
Raw Normal View History

2008-06-24 11:40:55 -04:00
2008-08-12 04:31:48 -04:00
USING: kernel sequences math stack-checker accessors macros
2008-06-24 11:40:55 -04:00
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 ;