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

Method is_explicit

crates/kernel/src/level.rs:95–101  ·  view source on GitHub ↗

True if this level is an explicit numeral: `Succ^n(Zero)` for some n ≥ 0.

(&self)

Source from the content-addressed store, hash-verified

93 /// names are NOT compared (matching the historical hash semantics).
94 /// Equal interned subtrees prune at the uid fast path.
95 fn structural_eq(&self, other: &Self) -> bool {
96 if self.hash_eq(other) {
97 return true;
98 }
99 match (self.data(), other.data()) {
100 (UnivData::Zero(_), UnivData::Zero(_)) => true,
101 (UnivData::Succ(a, _), UnivData::Succ(b, _)) => a.structural_eq(b),
102 (UnivData::Max(a1, b1, _), UnivData::Max(a2, b2, _))
103 | (UnivData::IMax(a1, b1, _), UnivData::IMax(a2, b2, _)) => {
104 a1.structural_eq(a2) && b1.structural_eq(b2)

Callers 1

maxMethod · 0.80

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected