BendMlTensorArray.half.go: def of bend-ml-tensor-array@0.1.19.0 Import: import bend-ml-tensor-array@0.1.19.0/main.bend as BendMlTensorArray Lines 1491-1502 of bend-ml-tensor-array@0.1.19.0/main.bend: https://jend.leeeet.dev/read.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&start_line=1491&end_line=1502 import Base # n / 2 rounded down. A tail loop with an accumulator: a non-tail recursion here would put a # continuation on every node of the band tree and keep the bands from running in parallel. def half.go(n: Nat, acc: Nat) -> Nat: match n: case 0n: acc case 1n+p: match p: case 0n: acc case 1n+q: half.go(q, 1n+acc) Uses (1): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat