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

Function def_eq_const_diff_addr

crates/kernel/src/def_eq.rs:1909–1915  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1907/// Extract head constant KId from expression or app spine.
1908fn head_const_id<M: KernelMode>(e: &KExpr<M>) -> Option<KId<M>> {
1909 match e.data() {
1910 ExprData::Const(id, _, _) => Some(id.clone()),
1911 ExprData::App(..) => {
1912 let head = app_head(e);
1913 match head.data() {
1914 ExprData::Const(id, _, _) => Some(id.clone()),
1915 _ => None,
1916 }
1917 },
1918 _ => None,

Callers

nothing calls this directly

Calls 3

env_with_idFunction · 0.70
cnstFunction · 0.70
mk_idFunction · 0.70

Tested by

no test coverage detected