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

anyboolean
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

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

Not

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

And

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

Or

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

Xor

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

Equal

A, Bbool
Pops two species, returns true if they are equal, otherwise returns false.

Compare Eq

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

Compare

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

In Block

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