From ccfd2fe76b1ca73142e641efa5b82a41fdfb75ef Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 9 Sep 2019 01:56:38 -0700 Subject: [PATCH] Fix botched unique implementation --- src/Scylla/Sync.elm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Scylla/Sync.elm b/src/Scylla/Sync.elm index 14a204d..1246208 100644 --- a/src/Scylla/Sync.elm +++ b/src/Scylla/Sync.elm @@ -274,7 +274,7 @@ uniqueByTailRecursive f l s acc = x::tail -> if Set.member (f x) s then uniqueByTailRecursive f tail s acc - else uniqueByTailRecursive f tail s (x::acc) + else uniqueByTailRecursive f tail (Set.insert (f x) s) (x::acc) [] -> List.reverse acc uniqueBy : (a -> comparable) -> List a -> List a