def cnt

minebender-game@1.0.0.0 · proof_gen.bend:649

import minebender-game@1.0.0.0/proof_gen.bend as ProofGen
import Base

649# How many elements of xs are i.
650def cnt(+i: Nat, xs: List<&2, Nat>) -> Nat:
651  match xs:
652    case Nil{}:
653      0n
654    case x <> t:
655      Nat.add(Bool.pick(Nat, Nat.is_eq(x, i), 1n, 0n), cnt(i, t))

Uses (5)

Used by (12)