MCPcopy Create free account
hub / github.com/argumentcomputer/ix / count_expr_nodes

Function count_expr_nodes

crates/ffi/src/refcount.rs:328–338  ·  view source on GitHub ↗
(expr: &LeanIxExpr<impl LeanRef>)

Source from the content-addressed store, hash-verified

326 n_threads: usize,
327) -> LeanOwned {
328 fn count_expr_nodes(expr: &LeanIxExpr<impl LeanRef>) -> u64 {
329 let ctor = expr.as_ctor();
330 match ctor.tag() {
331 5 => {
332 // app
333 1 + count_expr_nodes(&LeanIxExpr(ctor.get(0)))
334 + count_expr_nodes(&LeanIxExpr(ctor.get(1)))
335 },
336 _ => 1,
337 }
338 }
339
340 let shared = LeanShared::new(arr.inner().to_owned_ref());
341

Callers 1

Calls 2

tagMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected