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

Method imax

crates/common/src/env.rs:427–433  ·  view source on GitHub ↗

Constructs `imax x y` (impredicative max).

(x: Level, y: Level)

Source from the content-addressed store, hash-verified

425 let mut n: u64 = 0;
426 while let LevelData::Succ(inner, _) = cur.as_data() {
427 n += 1;
428 cur = inner.clone();
429 }
430 (cur, n)
431 }
432 /// If this level is an explicit numeral `Succ^n(Zero)`, returns
433 /// `Some((Zero, n))`. Otherwise returns `None`.
434 pub fn explicit_offset(&self) -> Option<(Level, u64)> {
435 let (base, n) = self.peel_succ();
436 if matches!(base.as_data(), LevelData::Zero(_)) {

Callers

nothing calls this directly

Calls 4

as_bytesMethod · 0.80
get_hashMethod · 0.80
finalizeMethod · 0.80
LevelClass · 0.70

Tested by

no test coverage detected