The 'atom' predicate function tests if the 'expr' is an atom. T is returned if 'expr' is an atom, NIL is returned otherwise.
(atom 'a) => T ; symbol (atom #'atom) => T ; subr - function (atom "string") => T ; string (atom 4) => T ; integer (atom 4.5) => T ; float (atom object) => T ; object (atom #(1 2 3)) => T ; array (atom #'quote) => T ; fsubr (atom *standard-output*) => T ; stream (atom '()) => T ; NIL is an atom (atom (lambda (x) (print x))) => T ; closure (atom '(a b c)) => NIL ; list (setq a '(a b)) => (A B) (atom a) => NIL ; value of A is not an atom
Note: NIL or '() is used in many places as a list or atom expression. Both 'atom' and listp, when applied to NIL, return T .
See also: