WLJS LogoWLJS Notebook

Stack

Stack[] shows the current evaluation stack, giving a list of the tags associated with evaluations that are currently being done.

Stack[pattern] gives a list of expressions currently being evaluated which match the pattern.

Examples

View the stack during evaluation:

f[x_] := g[x];
g[x_] := Stack[];
f[1]
(* {f, g} *)

Stack with pattern matching:

Stack[_Plus]

Please visit the official Wolfram Language Reference for more details.

On this page