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}].
  • Shallow acts as a "wrapper", which affects printing, but not evaluation.
  • Trying to feed k as obtained from Shallow back as input to the Wolfram Language in StandardForm will generate an error.

Examples

open allclose all

Basic Examples  (2)

Shallow display of a list:

Shallow display of a nested list:

Properties & Relations  (2)

Shortened outputs contain Skeleton objects:

Short displays with long expressions shortened from within:

Shallow shortens from the end:

Possible Issues  (0)

Introduced in 1991
 (2.0)
 |
Updated in 1996
 (3.0)