1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Invert the test.

This commit is contained in:
Rob Rix 2015-12-11 17:36:19 -05:00
parent 56fcf84f22
commit 253f21d885

View File

@ -37,7 +37,7 @@ empty :: OrderedMap key value
empty = OrderedMap []
union :: Eq key => OrderedMap key value -> OrderedMap key value -> OrderedMap key value
union (OrderedMap a) (OrderedMap b) = OrderedMap $ a ++ filter ((`elem` extant) . fst) b
union (OrderedMap a) (OrderedMap b) = OrderedMap $ a ++ filter (not . (`elem` extant) . fst) b
where extant = fst <$> a
unions :: Eq key => [OrderedMap key value] -> OrderedMap key value