substitute<A extends Expr> function

A substitute<A extends Expr>(
  1. Expr ast,
  2. Map<Expr, Expr> substitutions
)

Substitutes expressions in expr where the keys of substitutions are replaced with their corresponding values.

Implementation

A substitute<A extends Expr>(Expr ast, Map<Expr, Expr> substitutions) =>
    currentContext.substitute(ast, substitutions) as A;