BendTensors.Flat.depth.go: def of bend-tensors@0.0.0.2 Import: import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensors Lines 1687-1696 of bend-tensors@0.0.0.2/bend_tensors.bend: https://jend.leeeet.dev/read.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&start_line=1687&end_line=1696 import Base # the smallest d with 2^d >= n; the fuel bounds the doubling steps def Flat.depth.go(fuel: Nat, +d: Nat, +cap: Nat, +n: Nat, lt: Bool) -> Nat: match fuel lt: case _ False{}: d case 0n _: d case 1n+f True{}: +cap2 = Nat.add(cap, cap) Flat.depth.go(f, 1n+d, cap2, n, Nat.is_lt(cap2, n)) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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