@@ -37,15 +37,14 @@ isElem x (y :: xs) with (decEq x y)
3737 mkNo f g Here = f Refl
3838 mkNo f g (There x) = g x
3939
40+||| The intersectBy function returns the intersect of two lists by user-supplied equality predicate.
4041intersectBy : (a -> a -> Bool) -> List a -> List a -> List a
41−intersectBy _ [] _ = []
42−intersectBy _ _ [] = []
4342intersectBy eq xs ys = [x | x <- xs, any (eq x) ys]
4443
45−||| The intersect ∩ function returns the list intersect of the two lists. For example,
44+||| Compute the intersection of two lists according to their `Eq` instance.
4645|||
4746||| ```idris example
48−||| intersect [1,2,3,4] [2,4,6,8]
47+||| intersect [1, 2, 3, 4] [2, 4, 6, 8]
4948||| ```
5049|||
5150intersect : (Eq a) => List a -> List a -> List a