mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
Invert the test.
This commit is contained in:
parent
56fcf84f22
commit
253f21d885
@ -37,7 +37,7 @@ empty :: OrderedMap key value
|
|||||||
empty = OrderedMap []
|
empty = OrderedMap []
|
||||||
|
|
||||||
union :: Eq key => OrderedMap key value -> OrderedMap key value -> OrderedMap key value
|
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
|
where extant = fst <$> a
|
||||||
|
|
||||||
unions :: Eq key => [OrderedMap key value] -> OrderedMap key value
|
unions :: Eq key => [OrderedMap key value] -> OrderedMap key value
|
||||||
|
Loading…
Reference in New Issue
Block a user