Deque.Deque.count: def of bend-kit-collections@0.1.4.1 Import: import bend-kit-collections@0.1.4.1/deque.bend as Deque Lines 36-42 of bend-kit-collections@0.1.4.1/deque.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-collections@0.1.4.1/deque.bend&start_line=36&end_line=42 import Base # a list and its length, in one pass that hands the list back def Deque.count(a, -A: Kind(a), xs: List) -> List & Nat: match xs: case Nil{}: (Nil{}, 0n) case h <> t: Deque.count.put(a, A, h, Deque.count(a, A, t)) Uses (5): 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=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=bend-kit-collections@0.1.4.1/deque.bend&name=Deque.count.put