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

Function placeholderDef

src/compute-engine/boxed-expression/utils.ts:447–454  ·  view source on GitHub ↗
(
  ce: ComputeEngine,
  name: string
)

Source from the content-addressed store, hash-verified

445 // recursion limit with an error.
446 if (callsFunction(literal.op1, call.operator)) return undefined;
447
448 // `Function(body, param₁, …)`. Decline on an arity mismatch: that is the
449 // broadcast/partial-application path, which has its own semantics.
450 const params = literal.ops.slice(1);
451 if (params.length === 0 || params.length !== call.nops) return undefined;
452
453 const substitution: Record<string, Expression> = {};
454 for (let i = 0; i < params.length; i++) {
455 // `functionLiteralParameterName` unwraps a `Typed(x, type)` parameter, so
456 // a typed function literal (`(x: real) ↦ …`) inlines like a bare one.
457 const name = functionLiteralParameterName(params[i]);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected