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 generalized boolean


Word description
Applies the quotation to both x and y, and then returns the first result that is not f.

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