From 6ff0765cfbcf5309395d234a4cb7e4e576dee76a Mon Sep 17 00:00:00 2001 From: Saku Laesvuori Date: Sat, 2 Sep 2023 14:36:11 +0300 Subject: [PATCH] Korjaa updateListBy --- src/TiedoteMD/State.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TiedoteMD/State.hs b/src/TiedoteMD/State.hs index 6d16436..910addb 100644 --- a/src/TiedoteMD/State.hs +++ b/src/TiedoteMD/State.hs @@ -35,7 +35,7 @@ emptyState = State updateListBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] updateListBy f old new = olds <> news where news = differenceBy f new old - olds = intersectBy f old news + olds = intersectBy f old new elemBy :: (a -> b -> Bool) -> a -> [b] -> Bool elemBy = (.) any