Comparison

Logical Operators

not x

Returns the opposite of n. Accepts only boolean types.

Equivalent to the (!) unary operator.

Example:

false_ = not true
false_ = (!) true
false_ = !true

and x y

Returns true if x and y are both true, false otherwise. Accepts only boolean types.

Equivalent to the (&&) binary operator.

Example:

false_ = and true false
false_ = (&&) true false
false_ = true && false

or x y

Returns true if either x or y are true, false otherwise. Accepts only boolean types.

Equivalent to the (||) binary operator.

Example:

Relational Operators

eq x y

Returns true if x equals y, false otherwise. Accepts only boolean types.

Equivalent to the (==) binary operator.

Example:

neq x y

Returns true if x does not equal y, false otherwise. Accepts only boolean types.

Equivalent to the (!=) binary operator.

Example:

lt x y

Returns true if x is less than y, false otherwise. Accepts only boolean types.

Equivalent to the (<) binary operator.

Example:

gt x y

Returns true if x is greater than y, false otherwise. Accepts only boolean types.

Equivalent to the (>) binary operator.

Example:

lte x y

Returns true if x is less than or equal to y, false otherwise. Accepts only boolean types.

Equivalent to the (<=) binary operator.

Example:

gte x y

Returns true if x is greater than or equal to y, false otherwise. Accepts only boolean types.

Equivalent to the (>=) binary operator.

Example:

Last updated