Bool

:= [False, True]
not : Bool -> Bool

Returns Bool.False when given Bool.True, and vice versa. This is equivalent to the logic NOT gate. The operator ! can also be used as shorthand for Bool.not.

expect Bool.not(Bool.False) == Bool.True
expect !Bool.False == Bool.True
is_eq : Bool, Bool -> Bool

Returns Bool.True if the two booleans are the same, and Bool.False if they are different.

encode : Bool, fmt -> Try(encoded, err) where { fmt.encode_bool : fmt, Bool -> Try(encoded, err) }

Encode a bool using a format that provides encode_bool

decode : src, fmt -> (Try(Bool, err), src) where { fmt.decode_bool : fmt, src -> (Try(Bool, err), src) }

Decode a bool using a format that provides decode_bool