Skip to content

Commit 049d92f

Browse files
committed
Merge pull request #68 from hdgarrood/master
Avoid using operators for binding arguments
2 parents 698807f + 941aadd commit 049d92f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Data/List.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ nub = nubBy eq
582582
-- | Running time: `O(n^2)`
583583
nubBy :: forall a. (a -> a -> Boolean) -> List a -> List a
584584
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))
586586

587587
-- | Calculate the union of two lists.
588588
-- |
@@ -609,8 +609,8 @@ delete = deleteBy (==)
609609
-- | Running time: `O(n)`
610610
deleteBy :: forall a. (a -> a -> Boolean) -> a -> List a -> List a
611611
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)
614614

615615
infix 5 difference as \\
616616

0 commit comments

Comments
 (0)