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

Function mapCall

scripts/rubi/wl-parser.ts:473–482  ·  view source on GitHub ↗
(wlHead: string, args: Json[])

Source from the content-addressed store, hash-verified

471}
472
473function mapCall(wlHead: string, args: Json[]): Json {
474 // WL Log[x] is the natural log; Log[b, x] is log base b.
475 if (wlHead === 'Log')
476 return args.length === 1 ? ['Ln', args[0]] : ['Log', args[1], args[0]];
477 const head = HEAD_MAP[wlHead];
478 if (head) return [head, ...args];
479 // Pass through (Hypergeometric2F1, AppellF1, EllipticE/F/Pi, PolyLog,
480 // FresnelS, … — resolved as shells or reported as unknown-symbol).
481 return [wlHead, ...args];
482}
483
484/** Parse a single WL InputForm expression. Throws on syntax errors. */
485export function parseWL(src: string): Json {

Callers 1

parsePostfixMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected