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

Function leafCount

scripts/rubi/benchmark.ts:120–123  ·  view source on GitHub ↗
(e: BoxedExpression)

Source from the content-addressed store, hash-verified

118 for (let i = 1; i < expr.length; i++) collectSymbols(expr[i], out);
119 }
120}
121
122function leafCount(e: BoxedExpression): number {
123 if (!e.ops) return 1;
124 return 1 + e.ops.reduce((s, op) => s + leafCount(op), 0);
125}
126

Callers 1

runProblemFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected