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 result of the last quotation, or f


Word description
If every quotation in the sequence outputs a true value, outputs the result of the last quotation, otherwise outputs f.

Definition

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