Bool
Boolean type and operations.
While boolean operators _ and _
and _ or _
are short-circuiting,
avoiding computation of the right argument when possible, the functions
logand(_, _)
and logor(_, _)
are strict and will always evaluate both
of their arguments.
type Bool = Prim.Types.Bool
Booleans with constants true
and false
.
public func toText(x : Bool) : Text
Conversion.
public func logand(x : Bool, y : Bool) : Bool
Returns x and y
.
public func logxor(x : Bool, y : Bool) : Bool
Returns exclusive or of x
and y
, x != y
.
public func lognot(x : Bool) : Bool
Returns not x
.
public func notEqual(x : Bool, y : Bool) : Bool
Returns x != y
.
public func compare(x : Bool, y : Bool) : {#less; #equal; #greater}
Returns the order of x
and y
, where false < true
.