VocabularykernelInputsobj1 | a generalized boolean |
obj2 | a generalized boolean |
OutputsWord descriptionIf both inputs are true, outputs
obj2. otherwise outputs
f.
NotesThis 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.
ExamplesUsually 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 second is output:
USING: kernel prettyprint ;
t f and .
f
USING: kernel prettyprint ;
t 7 and .
7
USING: kernel prettyprint ;
"hi" 12.0 and .
12.0
Definition