Handbook
Glossary
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
x
an
object
y
an
object
quot
a
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
IN:
kernel
:
both?
( x y quot -- ? )
bi@
and
;
inline