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

# frames -- get the frames associated to a closure

- Usage:
    `frames f`
- Inputs:
  - f, () or a symbol, a function, or an instance of the type PseudocodeClosure
- Outputs:
  - a list of mutable lists, the frames attached to the closure f or, if f is (), then the frames attached to the current lexical scope

## Description

This function is occasionally useful as a debugging tool.

    i1 : f = (x,y,z) -> t -> t

    o1 = f

    o1 : FunctionClosure

    i2 : g = f(111,222,"hi there")

    o2 = g

    o2 : FunctionClosure

    i3 : frames g

    o3 = {MutableList{...3...}, MutableList{}}

    o3 : List

    i4 : peek first oo

    o4 = MutableList{111, 222, hi there}

## Ways to use frames:

- `frames(CompiledFunction)`
- `frames(CompiledFunctionClosure)`
- `frames(FunctionClosure)`
- `frames(PseudocodeClosure)`
- `frames(Sequence)`
- `frames(Symbol)`

## For the programmer

The object frames is a compiled function.

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