Version: 4.1.4
1.4.1 Booleans
t : booleanp |
The boolean truth value.
nil : booleanp |
The boolean falsehood value.
(and bool ) |
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 |
(booleanp x) → t |
x : t |
Determines if x is either t or nil.
Examples: |
> (booleanp t) |
t |
> (booleanp nil) |
t |
> (booleanp 'yes) |
() |
(iff p q) → t |
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) |
t |
> (iff 5 nil) |
() |
(implies p q) → t |
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 |
(not x) → t |
x : t |
If x is nil, then returns t. Otherwise, returns nil.
Examples: |
> (not t) |
() |
> (not nil) |
t |
> (not 5) |
() |
> (not 0) |
() |
(or x ) |
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 |