MCPcopy Create free account
hub / github.com/agenticsorg/lean-agentic / create_variable

Method create_variable

leanr-wasm/src/lib.rs:41–46  ·  view source on GitHub ↗
(&mut self, index: u32)

Source from the content-addressed store, hash-verified

39 /// Returns true if successful
40 #[wasm_bindgen(js_name = createVariable)]
41 pub fn create_variable(&mut self, index: u32) -> bool {
42 let term = self.arena.mk_var(index);
43 self.term_counter += 1;
44 console::log_1(&format!("Created variable with index {} -> TermId {:?}", index, term).into());
45 true
46 }
47
48 /// Create two identical variables and verify they share the same ID
49 /// Returns true if hash-consing worked (same IDs)

Callers

nothing calls this directly

Calls 1

mk_varMethod · 0.80

Tested by

no test coverage detected