Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 852 Bytes

booleans.md

File metadata and controls

37 lines (28 loc) · 852 Bytes

Booleans

Booleans is another RainLisp's basic data type. A boolean is either true or false.

Let's evaluate some boolean literals.

true

-> true

false

-> false

There is a primitive procedure not that returns the logical negation of the argument.

(not true)

-> false

(not false)

-> true

Note that in RainLisp, in conditional expressions like if, cond and others like not, and, or that expect booleans, all values other than false are considered to be true. For example, (not 0) and (not 1) both give false.

The boolean logical operations are:

Next, let's learn about strings.