Sha.depth.go: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/share/sha.bend as Sha Lines 32-39 of ezx@1.11.0.0/src/share/sha.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/share/sha.bend&start_line=32&end_line=39 import Base # the depth of an array whose capacity, 2^depth, is at least `words` def depth.go(bits: Nat, +words: Nat, +cap: Nat, +acc: Nat) -> Nat: match bits: case 0n: acc case 1n+p: depth.step(Nat.is_lt(cap, words), acc, _u => depth.go(p, words, Nat.mul(cap, 2n), Nat.add(acc, 1n))) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/share/sha.bend&name=depth.step