Tensor.count: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/tensor.bend as Tensor Lines 475-480 of bendtorch@1.3.0.0/tensor.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/tensor.bend&start_line=475&end_line=480 import Base def count(+k: Nat, p: List<&2, Nat>) -> Nat: match p: case Nil{}: 0n case Con{+h, r}: Nat.add(Bool.pick(Nat, Nat.is_eq(h, k), 1n, 0n), count(k, r)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick 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=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq