Handbook
Glossary
2|| ( obj1 obj2 quots -- ? )
Factor handbook
»
The language
»
Combinators
»
Short-circuit combinators
Prev:
1|| ( obj quots -- ? )
Next:
3|| ( obj1 obj2 obj3 quots -- ? )
Vocabulary
combinators
.
short-circuit
Inputs
obj1
an
object
obj2
an
object
quots
a sequence of quotations with stack effect
( obj1 obj2 -- ? )
Outputs
?
the first true result, or
f
Word description
Returns true if any quotation in the sequence returns true. Each quotation takes the same two elements from the datastack and must return a boolean.
Definition
IN:
combinators.short-circuit
:
2||
( obj1 obj2 quots -- ? )
2
n||
;