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

Function addSequenceRecurrence

src/compute-engine/sequence.ts:558–568  ·  view source on GitHub ↗
(
  ce: ComputeEngine,
  name: string,
  variable: string,
  expr: Expression
)

Source from the content-addressed store, hash-verified

556
557/**
558 * Add a recurrence relation for a single-index sequence definition.
559 * e.g., from `L_n := L_{n-1} + 1`
560 *
561 * We store the recurrence as a LaTeX string rather than a Expression
562 * because the expression may have been parsed before the symbol was declared
563 * with subscriptEvaluate. Storing as LaTeX allows us to re-parse fresh when
564 * creating the handler, ensuring proper binding.
565 */
566export function addSequenceRecurrence(
567 ce: ComputeEngine,
568 name: string,
569 variable: string,
570 expr: Expression
571): void {

Callers 1

core.tsFile · 0.90

Calls 3

getOrCreatePendingFunction · 0.85
serializeLatexFunction · 0.85
tryFinalizeSequenceFunction · 0.85

Tested by

no test coverage detected