Skip to content

pruneAst

pruneAst(options): AST

pruneAst prunes the given AST based on EvalState and returns a copy-on-write residual AST.

Typical uses include repeatedly evaluating an expression with unknowns while caching known function results, or constant-folding a compiled expression before storing it in a cache.

PruneAstOptions

AST