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

Method lam

crates/common/src/env.rs:880–888  ·  view source on GitHub ↗

Constructs a lambda abstraction `fun (n : t) => b`.

(n: Name, t: Expr, b: Expr, bi: BinderInfo)

Source from the content-addressed store, hash-verified

878 hasher.update(&[EREF]);
879 hasher.update(x.get_hash().as_bytes());
880 for u in &us {
881 hasher.update(u.get_hash().as_bytes());
882 }
883 Expr(Arc::new(ExprData::Const(x, us, hasher.finalize())))
884 }
885
886 /// Constructs a function application `f a`.
887 pub fn app(f: Expr, a: Expr) -> Self {
888 let mut hasher = blake3::Hasher::new();
889 hasher.update(&[EAPP]);
890 hasher.update(f.get_hash().as_bytes());
891 hasher.update(a.get_hash().as_bytes());

Callers

nothing calls this directly

Calls 5

binder_info_tagFunction · 0.85
as_bytesMethod · 0.80
get_hashMethod · 0.80
finalizeMethod · 0.80
ExprClass · 0.70

Tested by

no test coverage detected