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

Function containsOperator

scripts/rubi/benchmark.ts:125–129  ·  view source on GitHub ↗
(expr: BoxedExpression, op: string)

Source from the content-addressed store, hash-verified

123 if (!e.ops) return 1;
124 return 1 + e.ops.reduce((s, op) => s + leafCount(op), 0);
125}
126
127function containsOperator(expr: BoxedExpression, op: string): boolean {
128 if (expr.operator === op) return true;
129 if (expr.ops) return expr.ops.some((x) => containsOperator(x, op));
130 return false;
131}
132

Callers 1

runProblemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected