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

Function collectSymbols

scripts/rubi/benchmark.ts:109–118  ·  view source on GitHub ↗
(expr: Json, out: Set<string>)

Source from the content-addressed store, hash-verified

107 return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
108 };
109}
110
111function collectSymbols(expr: Json, out: Set<string>): void {
112 if (typeof expr === 'string') {
113 if (!KNOWN_CONSTANTS.has(expr)) out.add(expr);
114 return;
115 }
116 if (Array.isArray(expr)) {
117 // skip the operator position for known string heads
118 for (let i = 1; i < expr.length; i++) collectSymbols(expr[i], out);
119 }
120}
121

Callers 1

runProblemFunction · 0.70

Calls 2

hasMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected