Module "Logic": Logic Values and Functions

#t

Represents the true value.


#f

Represents the false value.


not \v

Result is true if v is false, otherwise true. Logical NOT.


(||) \a \b

Result is true if either a or b are true or both. Logical OR.

Example:

if (2 < 3 || 5 < 3) 5 else 7 => 5

(&&) \a \b

Result is true if both a and b are true. Logical AND.

if (2 < 3 && 1 < 3) 5 else 7 => 5

equivalent? \a \b

Result is true if the statements a and b are equivalent. Logical equivalence.


implies? \a \b

Result is true if a implies b. Logical implication.


Module "Logic": Conditionals

if \c \T else \F

Result is T if c is true, otherwise F.

Example:

if (nil? nil) 'yes else 'no => 'yes