(atom item)
Determine whether or not an item is an atom.
Generally, an atom is considered a number or a variable. More specifically, it is anything other than a list. The atom function tests item to see if it is an atom. If item is a list, a nil is returned. If it is not a list, a T is returned.
Examples
Code | Returns |
---|---|
(atom '(1 2 3)) | nil |
(atom 5) | T |
(atom '5) | T |