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

Function findMatchingBaseCase

src/compute-engine/sequence.ts:197–207  ·  view source on GitHub ↗

* Find matching base case for given indices.

(
  cases: PreparedBaseCase[],
  indices: number[]
)

Source from the content-addressed store, hash-verified

195 }
196 return a.variableCount - b.variableCount;
197 });
198
199 return cases;
200}
201
202/**
203 * Find matching base case for given indices.
204 */
205function findMatchingBaseCase(
206 cases: PreparedBaseCase[],
207 indices: number[]
208): Expression | undefined {
209 for (const { pattern, value } of cases) {
210 if (matchPattern(pattern, indices)) {

Callers 1

createSequenceHandlerFunction · 0.85

Calls 1

matchPatternFunction · 0.70

Tested by

no test coverage detected