2.4.1 Booleans
The boolean truth value.
The boolean falsehood value.
Returns nil if and only if one or more of its arguments is nil. Otherwise, returns the last argument given. If given no arguments, returns t.
Examples: |
> (and) |
t |
> (and t t t) |
t |
> (and t nil t) |
() |
> (and 1 2 3 4 5) |
5 |
x : t |
Determines if x is either t or nil.
Examples: |
> (booleanp t) |
t |
> (booleanp nil) |
t |
> (booleanp 'yes) |
() |
p : t |
q : t |
Returns t if and only if p and q are either both nil or both non-nil.
Examples: |
> (iff t t) |
t |
> (iff nil nil) |
t |
> (iff t nil) |
() |
> (iff nil t) |
() |
> (iff 5 6) |
5 |
> (iff 5 nil) |
() |
p : t |
q : t |
Returns nil if and only if q is nil and p is non-nil. Otherwise, returns t.
Examples: |
> (implies t t) |
t |
> (implies t nil) |
() |
> (implies nil t) |
t |
> (implies nil nil) |
t |
x : t |
If x is nil, then returns t. Otherwise, returns nil.
Examples: |
> (not t) |
() |
> (not nil) |
t |
> (not 5) |
() |
> (not 0) |
() |
Returns t if and only if one or more of its arguments is t. Otherwise, returns the last argument given. If given no arguments, returns nil.
Examples: |
> (or) |
() |
> (or nil nil t) |
t |
> (or nil nil 5 6) |
5 |