logic Module

>

a1 a2 bool

Returns true if a1 is greater than a2, false otherwise.

Note

Only comparisons among two numbers or two strings are supported.

>=

a1 a2 bool

Returns true if a1 is greater than or equal to a2, false otherwise.

Note

Only comparisons among two numbers or two strings are supported.

<

a1 a2 bool

Returns true if a1 is smaller than a2, false otherwise.

Note

Only comparisons among two numbers or two strings are supported.

<=

a1 a2 bool

Returns true if a1 is smaller than or equal to a2, false otherwise.

Note

Only comparisons among two numbers or two strings are supported.

==

a1 a2 bool

Returns true if a1 is equal to a2, false otherwise.

!=

a1 a2 bool

Returns true if a1 is not equal to a2, false otherwise.

and

bool1 bool2 bool3

Returns true if bool1 is equal to bool2, false otherwise.

boolean?

a bool

Returns true if a is a boolean, false otherwise.

dequote-and

a1 a2 bool

Short-circuited logical and. It performs the following operations:

  1. Pops a1 and a2 off the stack.
  2. Dequotes a1, if false is on the stack, it pushes false on the stack and stops, otherwise it carries on.
  3. Dequotes a2.
  4. If a2 is true, it pushes true on the stack.

Note

a1 (and a2, if dequoted) must evaluate to a boolean value, otherwise an exception is raised.

dequote-or

a1 a2 bool

Short-circuited logical or. It performs the following operations:

  1. Pops a1 and a2 off the stack.
  2. Dequotes a1, if true is on the stack, it pushes true on the stack and stops, otherwise it carries on.
  3. Dequotes a2.
  4. If a2 is false, it pushes false on the stack.

Note

a1 (and a2, if dequoted) must evaluate to a boolean value, otherwise an exception is raised.

dictionary?

a bool

Returns true if a is a dictionary, false otherwise.

float?

a bool

Returns true if a is a float, false otherwise.

or

bool1 bool2 bool3

Returns true if bool1 or bool2 is true, false otherwise.

integer?

a bool

Returns true if a is an integer, false otherwise.

not

bool1 bool2

Negates bool1.

number?

a bool

Returns true if a is a number, false otherwise.

quotation?

a bool

Returns true if a is a quotation, false otherwise.

type?

a 'sym bool

Returns true if a is a dictionary of the specified type 'sym, false otherwise.

xor

bool1 bool2 bool3

Returns true if bool1 and bool2 are different, false otherwise.