def List.contains

Base · base.bend:1131

import Base
1131def List.contains(
1132  ~A: Data, ~eq: A -> A -> Bool, xs: List<&2, A>, +x: A
1133) -> Bool:
1134  match xs:
1135    case Nil{}:
1136      False{}
1137    case h <> t:
1138      List.any.if(u => List.contains(~A, ~eq, t, x), eq(h, x))

Uses (3)

Used by (108)