Bits (Booleans)

Constants

TRUE

Represents the boolean value true.

TRUE    == 1

FALSE

Represents the boolean value false.

FALSE    == 0

Conditionals

if

(if x t e)
> x : Bool
> t : a
> e : a
> a

Conditional operation. If the condition is true (non-zero), returns the second argument, otherwise returns the third argument.

ifNot

Inverted conditional. If the condition is false (zero), returns the second argument, otherwise returns the third argument.

ifz

Conditional based on zero. If the first argument is zero, returns the second argument, otherwise returns the third argument.

ifNonZero

Conditional based on non-zero. If the first argument is non-zero, returns the second argument, otherwise returns the third argument.

else

Identity function, used to improve readability in conditional expressions.

Bit Operations

bit

Converts a value to a bit (0 or 1).

not

Logical NOT operation.

and

Logical AND operation.

or

Logical OR operation.

xor

Logical XOR (exclusive OR) operation.

nand

Logical NAND (NOT AND) operation.

nor

Logical NOR (NOT OR) operation.

xnor

Logical XNOR (NOT XOR) operation.

Last updated