Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » debugging » peek
next | previous | forward | backward | up | index | toc

# peek -- examine contents of an object

- Usage:
    `peek o`
- Inputs:
  - o, a thing, any Macaulay2 object
- Outputs:
  - a net, laying out the internal contents of o to depth 1, bypassing installed methods for displaying the object

## Description

This function is used during debugging Macaulay2 programs to examine the internal structure of objects.

    i1 : set {1, 2, 3}

    o1 = set {1, 2, 3}

    o1 : Set

    i2 : peek oo

    o2 = Set{1 => 1}
             2 => 1
             3 => 1

    i3 : new MutableHashTable from { a => 3, b => 44}

    o3 = MutableHashTable{...2...}

    o3 : MutableHashTable

    i4 : peek oo

    o4 = MutableHashTable{a => 3 }
                          b => 44

## See also

- peek' -- examine contents of an object

## For the programmer

The object peek is a function closure.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/peek-doc.m2:55:0.