Shallow
Shallow[expr]
prints as a shallow form of expr.
Shallow[expr,depth]
prints with all parts of expr below the specified depth given in skeleton form.
Shallow[expr,{depth,length}]
also gives parts whose lengths are above the specified limit in skeleton form.
Shallow[expr,{depth,length},form]
uses skeleton form for any parts that match the pattern form.
Details
- Omitted sequences of elements are given as Skeleton objects, which print in the form k.
- In StandardForm, the characters used for this output are \[LeftSkeleton] and .
- Depth and length can be specified as Infinity.
- Shallow[expr] is equivalent to Shallow[expr,{4,10}].
- When an input evaluates to Shallow[expr], Shallow does not appear in the output. »
- Trying to feed k as obtained from Shallow back as input to the Wolfram Language in StandardForm will generate an error. »
Examples
open allclose allProperties & Relations (3)
Possible Issues (2)
The output of Shallow cannot be used as input if k appears in the result:
Copy the output and paste it into an input cell. The 90 will cause an error:
Even when an output omits Shallow from the top level, it is not stripped from subexpressions:
The output does not have Shallow in it:
However, the variable e does have Shallow in it, which may affect subsequent evaluations:
This Join is not evaluated due to the intervening Shallow:
Assign variables first and then apply Shallow to the result to maintain computability:
Text
Wolfram Research (1991), Shallow, Wolfram Language function, https://reference.wolfram.com/language/ref/Shallow.html (updated 1996).
CMS
Wolfram Language. 1991. "Shallow." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/Shallow.html.
APA
Wolfram Language. (1991). Shallow. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Shallow.html