Post Reopened by Mr.Wizard
4 Improved title

# What does "levelspec" mean in the documentationdo brackets around a levelspec option do?

Post Closed as "off-topic" by Kuba, m_goldberg, Artes, Oleksandr R., Yves Klett
3 deleted 2 characters in body; edited title

# Problem with the argument of What does "levelspec" mean in the Cases[] functiondocumentation?

The following code returns the first three integer elements of Sqrt[Range]:

Cases[Sqrt[Range], _Integer, 2, 3]
{1, 2, 3}


The following code looks like the preceding code but returns a different result:

Cases[Sqrt[Range], _Integer, {2}, 3]
{2, 3, 5}


As we can see in the following picture, the argument {2} is not documented (it has no braces in the documentation): What does the second code with {2} instead of 2 mean?

# Problem with the argument of the Cases[] function

The following code returns the first three integer elements of Sqrt[Range]:

Cases[Sqrt[Range], _Integer, 2, 3]
{1, 2, 3}


The following code looks like the preceding code but returns a different result:

Cases[Sqrt[Range], _Integer, {2}, 3]
{2, 3, 5}


As we can see in the following picture, the argument {2} is not documented (it has no braces in the documentation): What does the second code with {2} instead of 2 mean?

# What does "levelspec" mean in the documentation?

The following code returns the first three integer elements of Sqrt[Range]:

Cases[Sqrt[Range], _Integer, 2, 3]
{1, 2, 3}


The following code looks like the preceding code but returns a different result:

Cases[Sqrt[Range], _Integer, {2}, 3]
{2, 3, 5}


As we can see in the following picture, the argument {2} is not documented (it has no braces in the documentation): What does the second code with {2} instead of 2 mean?

2 edited tags
1