either? ( x y quot -- ? )
Factor handbook » The language » Combinators » Dataflow combinators » Apply combinators

Prev:both? ( x y quot -- ? )


Vocabulary
kernel

Inputs
xan object
yan object
quota quotation with stack effect ( ... obj -- ... ? )


Outputs
?a boolean


Word description
Tests if the quotation yields a true value when applied to either x or y.

Examples
USING: kernel math prettyprint ; 3 6 [ odd? ] either? .
t

USING: kernel math prettyprint ; 5 7 [ even? ] either? .
f


Definition

: either? ( x y quot -- ? ) bi@ or ; inline