I randomly found that Depth has a boolean option called Heads:

In[1]:= Depth[1, 2, 3, 4]
During evaluation of In[7]:= Depth::nonopt: Options expected (instead of 4) beyond position 1 in Depth[1,2,3,4]. An option must be a rule or a list of rules. >>
Out[1]= Depth[1, 2, 3, 4]

In[2]:= Options[Depth]


This is not documented but seems to do what one would guess. For example, the reference explicitly says as a "possible issue" that

Depth does not count depth in the head:

In[1]:= Depth[h[{{{a}}}][x, y]]
Out[1]= 2


but adding Heads -> True does exactly that:

In[2]:= Depth[h[{{{a}}}][x, y], Heads -> True]
Out[2]= 6


I wonder why the reference would go as far as saying that something that exists does not. Is this possibly a feature that used to be supported but (for whatever reason) is only kept for historical reasons, like the examples here? Can anyone confirm if the option is documented in some prior version?

• It is a documentation bug -- this option did not exist originally but was implemented in version 8.0.0. Unfortunately, the documentation update hasn't happened yet. Jan 12 '18 at 22:21
• Thank you, @ilian. I assume it's the same case for option AllowHeads of Dimensions. Should I report when I stumble upon similar cases? Jan 21 '18 at 23:14