MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / matchPattern

Function matchPattern

src/compute-engine/rubi/match.ts:53–60  ·  view source on GitHub ↗
(
  pat: Pat,
  expr: Expression,
  x: Expression
)

Source from the content-addressed store, hash-verified

51/**
52 * Match `expr` against `pat`. Returns a binding environment or null.
53 * `x` is the integration variable (matches `var` patterns exactly).
54 */
55export function matchPattern(
56 pat: Pat,
57 expr: Expression,
58 x: Expression
59): Env | null {
60 const env: Env = new Map();
61 return m(pat, expr, x, env, () => true) ? env : null;
62}
63

Callers

nothing calls this directly

Calls 1

mFunction · 0.70

Tested by

no test coverage detected