Previous: Destructive list operations, Up: Common List Functions [Contents][Index]
and?
checks to see if all its arguments are true. If they are,
and?
returns #t
, otherwise, #f
. (In contrast to
and
, this is a function, so all arguments are always evaluated
and in an unspecified order.)
Example:
(and? 1 2 3) ⇒ #t (and #f 1 2) ⇒ #f
or?
checks to see if any of its arguments are true. If any is
true, or?
returns #t
, and #f
otherwise. (To
or
as and?
is to and
.)
Example:
(or? 1 2 #f) ⇒ #t (or? #f #f #f) ⇒ #f
Returns #t
if object is not a pair and #f
if it is
pair. (Called atom
in Common LISP.)
(atom? 1) ⇒ #t (atom? '(1 2)) ⇒ #f (atom? #(1 2)) ; dubious! ⇒ #t