A Bool can be either
Gleam defines a handful of operators that work with Bools.
False && False // => False False && True // => False True && False // => False True && True // => True False || False // => False False || True // => True True || False // => True True || True // => True
|| are short circuiting, meaning they don't evaluate the right
hand side if they don't have to.
&& evaluates the right hand side if the left hand side is
|| evaluates the right hand side if the left hand side is
Gleam does not define more bool operators like
Instead, those are available as functions in the
While written in the code using a capital letter, they are represented at
runtime with the atoms
false, making them compatible with Elixir
and Erlang's booleans.
This is important if you want to use Gleam and Elixir or Erlang together in one project.
// Gleam True False
% Erlang true. false.