This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Built-in Functions / Programming / Expression Structure /

Level

FilledSmallSquare Level[expr, levelspec] gives a list of all subexpressions of expr on levels specified by levelspec.

FilledSmallSquare Level[expr, levelspec, f] applies f to the list of subexpressions.

FilledSmallSquare Level uses the standard level specification described in Section A.3.6.

FilledSmallSquare Level[expr, -1] gives a list of all "atomic" objects in expr.

FilledSmallSquare Level traverses expressions in depth-first order, so that the subexpressions in the final list are ordered lexicographically by their indices.

FilledSmallSquare See Section 2.1.7.

FilledSmallSquare See also: Apply, Map, Scan.

FilledSmallSquare New in Version 1.

Further Examples