Logic

These glyphs are involved in manipulating boolean species, species that represent either true or false. Numerically, true and false can be expressed as 1 or 0. These species are important as they are used to gate functionality by condition; for further details see the section on Quotations.

To Boolean

any → boolean
Converts a species into the corresponding boolean. If fed a boolean, returns the boolean. Returns false if fed null, a number with value 0, or an empty list. For everything else, the glyph returns true.

Bool To Num

boolean → number
Returns either 0 or 1 depending on the value of the boolean at the head of the capsum.

Not

boolean → boolean
Takes a boolean and returns the opposite value.
eg. False → True, or True → False

And

bool, bool → bool
Pops two booleans, returns true only if both of the inputs have value true.

Or

bool, bool → bool
Pops two booleans, returns true if at least one of the inputs has value true.

Xor

bool, bool → bool
Pops two booleans, returns true only if exactly one input is true, while the other is false.

Equal

A, B → bool
Pops two species, returns true if they are equal, otherwise returns false.

Compare Eq

num, num → bool
Returns true if the number below the head is smaller than or equal to the number at the head.

Compare

num, num → bool
Returns true if the number below the head is strictly smaller than the number at the head.

In Block

vector → boolean
Checks the vector position fed into the glyph. Returns true if the corresponding position is inside a block (solid), otherwise returns false.