Depth
gets the depth of
expr
.
gets the depth of
expr
with head expressions included.
The depth of an expression is defined as one plus the maximum number of Part
indices required to reach any part of expr
, except for heads.
Examples
Complex numbers are atomic, and hence have depth 1:
Generally Depth
ignores heads.
But if you include the option Heads->True
, the heads depth is included.
Implementation status
- ✅ - full supported