Shrink.list.chunks: def of bend-kit-property@0.4.0.0 Import: import bend-kit-property@0.4.0.0/shrink.bend as Shrink Lines 43-53 of bend-kit-property@0.4.0.0/shrink.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-property@0.4.0.0/shrink.bend&start_line=43&end_line=53 import Base # Every run of k elements at offsets o, o + k, ... that fits in n; stop tells whether o + k > n. def list.chunks(-A: Data, f: Nat, stop: Bool, +o: Nat, +k: Nat, +n: Nat, +xs: List<&2, A>) -> List<&1, List<&2, A>>: match f stop: case 0n _: Nil{} case 1n+p True{}: Nil{} case 1n+p False{}: +e = (o + k : Nat) List.append(&2, A, List.take(&2, A, xs, o), List.drop(&2, A, xs, e)) <> list.chunks(A, p, Nat.is_gt((e + k : Nat), n), e, k, n, xs) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.drop https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.take 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_gt