Std\Bool
Boolean combinators and conditional helpers.
Provides logical operations beyond the built-in && and || operators,
plus conditional execution helpers.
Functions
Section titled “Functions”not : Bool -> Bool
Section titled “not : Bool -> Bool”Logical negation.
not true # => falsenot false # => trueand : Bool -> Bool -> Bool
Section titled “and : Bool -> Bool -> Bool”Logical AND (short-circuiting).
and true true # => trueand true false # => falseor : Bool -> Bool -> Bool
Section titled “or : Bool -> Bool -> Bool”Logical OR (short-circuiting).
or false true # => trueor false false # => falsexor : Bool -> Bool -> Bool
Section titled “xor : Bool -> Bool -> Bool”Exclusive OR — true when exactly one argument is true.
xor true false # => truexor true true # => falseimplies : Bool -> Bool -> Bool
Section titled “implies : Bool -> Bool -> Bool”Logical implication: a → b. False only when a is true and b is false.
implies true true # => trueimplies true false # => falseimplies false true # => truewhen : Bool -> (() -> Symbol) -> Symbol
Section titled “when : Bool -> (() -> Symbol) -> Symbol”Executes fn () if cond is true, otherwise returns :ok.
when true (\-> :done) # => :donewhen false (\-> :done) # => :okunless : Bool -> (() -> Symbol) -> Symbol
Section titled “unless : Bool -> (() -> Symbol) -> Symbol”Executes fn () if cond is false, otherwise returns :ok.
unless false (\-> :done) # => :doneunless true (\-> :done) # => :ok