The boolean module gives you the full set of classical logic gates as Lion functions. All binary operations take exactly two boolean arguments. The unary not takes a single boolean. Passing a non-boolean value produces a schema validation error.
Functions
boolean/not
Negates a boolean value.
Result: false
boolean/and
Returns true when both arguments are true.
Result: false
boolean/or
Returns true when at least one argument is true.
Result: true
boolean/xor
Returns true when exactly one argument is true (exclusive or).
Result: true
Result: false
boolean/nand
Returns false only when both arguments are true (not-and).
Result: false
Result: true
boolean/nor
Returns true only when both arguments are false (not-or).
Result: true
Result: false
boolean/equals?
Returns true when both boolean values are identical.
Result: true
Composing boolean logic
Boolean operations nest naturally to express compound conditions:
Prefer cond over deeply nested boolean/and/boolean/or chains when you have three or more conditions. It is easier to read and adds else fallback support.