and* ( obj1 obj2 -- obj1/f )


Vocabulary
kernel

Inputs
obj1a generalized boolean
obj2a generalized boolean


Outputs
obj1/fa generalized boolean


Word description
If both inputs are true, outputs obj1. Otherwise outputs f.

Notes
This word implements boolean and, so applying it to integers will not yield useful results (all integers have a true value). Bitwise and is the bitand word.

Examples
Usually only the boolean value of the result is used, however you can also explicitly rely on the behavior that if both inputs are true, the first is output:
USING: kernel prettyprint ; t f and* .
f

USING: kernel prettyprint ; t 7 and* .
t

USING: kernel prettyprint ; "hi" 12.0 and* .
"hi"


See also
and

Definition

: and* ( obj1 obj2 -- obj1/f ) swap and ; inline