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

Function matchVariation

src/compute-engine/boxed-expression/match.ts:378–384  ·  view source on GitHub ↗
(op: string, ops: ReadonlyArray<ExpressionInput>)

Source from the content-addressed store, hash-verified

376
377/** Assuming expr is a function, attempts to match the patterns
378 * to the arguments of the function.
379 */
380function matchRecursive(
381 expr: Expression,
382 pattern: Expression,
383 substitution: BoxedSubstitution,
384 options: MatchOptions
385): BoxedSubstitution | null {
386 console.assert(isFunction(expr));
387 if (!isFunction(expr)) return null;

Callers 1

matchVariationsFunction · 0.85

Calls 2

matchOnceFunction · 0.85
functionMethod · 0.65

Tested by

no test coverage detected