 |
AtomQ
AtomQ[
expr
] yields True if expr is an expression which cannot be divided into subexpressions, and yields False otherwise.
You can use AtomQ in a recursive procedure to tell when you have reached the bottom of the tree corresponding to an expression. AtomQ gives True for symbols, numbers, strings and other raw objects. AtomQ gives True on any object whose subparts cannot be accessed using functions like Map. See the Mathematica book: Section 2.3.5. See also: NumberQ, Head, LeafCount, Length.
Further Examples
Integers, complex numbers, strings, and symbols are all atoms; a list is not an atom.
In[1]:= 
Out[1]= 
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT. SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION. | | | |
 | |
|