AtomQ

WMA link


AtomQ[expr]

returns True if expr is an expression which cannot be divided into subexpressions, or False otherwise.

An expression that cannot be divided into subparts is called called an “atom”.


Strings and expressions that produce strings are atoms:

Numeric literals are atoms:

So are Mathematical Constants:

A Symbol not bound to a value is an atom too:

On the other hand, expressions with more than one Part after evaluation, even those resulting in numeric values, aren't atoms:

Similarly any compound Expression, even lists of literals, aren't atoms:

Note that evaluation or the binding of “x” to an expression is taken into account:

Again, note that the expression evaluation to a number occurs before AtomQ evaluated:

Head