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

Function parseBasePattern

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

* Parse a base case key into a pattern. * * @example * parseBasePattern('0,0') → { type: 'exact', values: [0, 0] } * parseBasePattern('n,0') → { type: 'pattern', values: ['n', 0] } * parseBasePattern('n,n') → { type: 'pattern', values: ['n', 'n'] }

(key: string | number)

Source from the content-addressed store, hash-verified

99 | Record<string, { min?: number; max?: number }>;
100 /** Constraint expression for multi-index sequences */
101 constraints?: Expression;
102}
103
104/**
105 * Registry of complete sequences for introspection.
106 * Maps ComputeEngine → the metadata of each sequence that was registered
107 *
108 * The registry is engine-wide, but a sequence is a binding of a scope. A
109 * registered sequence is visible only while the definition that its name
110 * resolves to from the current scope holds the handler of that sequence
111 * (`visibleSequence()`). So a sequence stops being one when the scope that
112 * declared it is popped, or when `ce.undeclare()` removes it, and a
113 * sequence declared in an enclosing scope is one in the scopes under it.
114 *
115 * The registry can hold more than one sequence with the same name: a
116 * sequence `F` in the global scope and a sequence `F` in a child scope that

Callers 1

prepareBaseCasesFunction · 0.85

Calls 2

isNaNFunction · 0.85
mapMethod · 0.65

Tested by

no test coverage detected