File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -582,7 +582,7 @@ nub = nubBy eq
582
582
-- | Running time: `O(n^2)`
583
583
nubBy :: forall a . (a -> a -> Boolean ) -> List a -> List a
584
584
nubBy _ Nil = Nil
585
- nubBy (==) (Cons x xs) = Cons x (nubBy (==) (filter (\y -> not (x == y)) xs))
585
+ nubBy eq' (Cons x xs) = Cons x (nubBy eq' (filter (\y -> not (eq' x y)) xs))
586
586
587
587
-- | Calculate the union of two lists.
588
588
-- |
@@ -609,8 +609,8 @@ delete = deleteBy (==)
609
609
-- | Running time: `O(n)`
610
610
deleteBy :: forall a . (a -> a -> Boolean ) -> a -> List a -> List a
611
611
deleteBy _ _ Nil = Nil
612
- deleteBy (==) x (Cons y ys) | x == y = ys
613
- deleteBy (==) x (Cons y ys) = Cons y (deleteBy (==) x ys)
612
+ deleteBy eq' x (Cons y ys) | eq' x y = ys
613
+ deleteBy eq' x (Cons y ys) = Cons y (deleteBy eq' x ys)
614
614
615
615
infix 5 difference as \\
616
616
You can’t perform that action at this time.
0 commit comments