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

Prev:2tri@ ( u v w x y z quot -- )
Next:either? ( 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 both x and y.

Examples
USING: kernel math prettyprint ; 3 5 [ odd? ] both? .
t

USING: kernel math prettyprint ; 12 7 [ even? ] both? .
f


Definition

: both? ( x y quot -- ? ) bi@ and ; inline