Defs.count: def of lawful-fields@0.1.1.0 Import: import lawful-fields@0.1.1.0/defs.bend as Defs Lines 118-124 of lawful-fields@0.1.1.0/defs.bend: https://jend.leeeet.dev/read.txt?path=lawful-fields@0.1.1.0/defs.bend&start_line=118&end_line=124 import Base # How many times sep occurs in xs. def count(xs: List<&2, U32>, +sep: U32) -> Nat: match xs: case Nil{}: 0n case Con{+x, t}: count.if(U32.is_eq(x, sep), count(t, sep)) 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=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=lawful-fields@0.1.1.0/defs.bend&name=count.if