Korjaa updateListBy

This commit is contained in:
Saku Laesvuori 2023-09-02 14:36:11 +03:00
parent 5862f87add
commit 6ff0765cfb
Signed by: slaesvuo
GPG Key ID: 257D284A2A1D3A32

View File

@ -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