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

Method declareSequence

src/compute-engine/index.ts:1380–1382  ·  view source on GitHub ↗

* Declare a sequence with a recurrence relation. * * @example * ```typescript * // Fibonacci sequence * ce.declareSequence('F', { * base: { 0: 0, 1: 1 }, * recurrence: 'F_{n-1} + F_{n-2}', * }); * ce.parse('F_{10}').evaluate(); // → 55 * ```

(name: string, def: SequenceDefinition)

Source from the content-addressed store, hash-verified

1378 _typeCacheGeneration(): number {
1379 if (this._valueShieldKeys.length > 0) return this._baseCacheGeneration(0);
1380 // Even keys select the ordinary cache cell. Reserve bit 1 for fallback.
1381 return this._configurationLifecycle.typeVersion * 4;
1382 }
1383
1384 /** See `IComputeEngine._typeCacheFallbackGeneration()`.
1385 * @internal */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected