Spec.blocks: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/spec.bend as Spec Lines 175-181 of bendtorch@1.3.0.0/spec.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/spec.bend&start_line=175&end_line=181 import Base # k blocks of 2^p cells, the first from cell lo, each summed by bal; with p = 0, a row of k cells def blocks(+p: Nat, k: Nat, +lo: Nat) -> List<&2, Sum>: match k: case 0n: Nil{} case 1n+j: bal(p, lo) <> blocks(p, j, Nat.add(lo, pw(p))) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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=bendtorch@1.3.0.0/spec.bend&name=Sum https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/spec.bend&name=bal https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/spec.bend&name=pw