Bendtorch.cut: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 2731-2737 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=2731&end_line=2737 import Base # xs cut after its first n (a tail loop: a helper in the fork tree must not hold the stack) def cut(-A: Type, n: Nat, xs: List<&1, A>, acc: List<&1, A>) -> Halves: match n xs: case 1n+m Con{x, xt}: cut(A, m, xt, x <> acc) case _ _: Halves{List.reverse(&1, A, acc), xs} Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.reverse https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Halves