Skip to content

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.

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.

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

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

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

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

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

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

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

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

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