Deque.split: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/containers/deque.bend as Deque Lines 31-38 of bend-collections@1.0.0.0/src/containers/deque.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/containers/deque.bend&start_line=31&end_line=38 import Base def split(~T: Data, n: Nat, xs: List<&2, T>) -> List<&2, T> & List<&2, T>: match n xs: case 0n ys: (Nil{}, List.reverse(&2, T, ys)) case 1n+p Nil{}: (Nil{}, Nil{}) case 1n+p Con{x, tail}: split_cons(~T, x, split(~T, p, tail)) 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=List.reverse https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/deque.bend&name=split_cons