def memn
import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as Commonimport Base
172# membership of a natural number in a list of them
173def memn(+s: Nat, xs: List<&2, Nat>) -> Bool:
174 match xs:
175 case Nil{}:
176 False{}
177 case Con{+x, t}:
178 Bool.or(Nat.is_eq(x, s), memn(s, t))
Uses (5)
Used by (0)
No other definition uses this definition.