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
obj1an object
obj2an object
quotsa 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

: 2|| ( obj1 obj2 quots -- ? ) 2 n|| ;