Kernel.and
You're seeing just the macro
and
, go back to Kernel module for more information.
Strictly boolean "and" operator.
If left
is false
, returns false
; otherwise returns right
.
Requires only the left
operand to be a boolean since it short-circuits. If
the left
operand is not a boolean, a BadBooleanError
exception is raised.
Allowed in guard tests.
Examples
iex> true and false
false
iex> true and "yay!"
"yay!"
iex> "yay!" and true
** (BadBooleanError) expected a boolean on left-side of "and", got: "yay!"