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

Function bindIn

src/compute-engine/rubi/match.ts:91–103  ·  view source on GitHub ↗
(
  env: Env,
  name: string,
  value: Expression,
  k: () => boolean
)

Source from the content-addressed store, hash-verified

89 }
90 return envs;
91}
92
93function bindIn(
94 env: Env,
95 name: string,
96 value: Expression,
97 k: () => boolean
98): boolean {
99 const bound = env.get(name);
100 if (bound !== undefined) return bound.isSame(value) && k();
101 env.set(name, value);
102 if (k()) return true;
103 env.delete(name);
104 return false;
105}
106

Callers 3

mFunction · 0.85
defaultsFunction · 0.85
assignFunction · 0.85

Calls 5

kFunction · 0.85
getMethod · 0.65
isSameMethod · 0.65
setMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected