mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Fix inverted semantics of union
.
This commit is contained in:
parent
1e7dc0ff98
commit
92a28ad38a
@ -38,7 +38,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 (not . (`elem` extant) . fst) b
|
||||
union (OrderedMap a) (OrderedMap b) = OrderedMap $ a ++ filter ((`elem` extant) . fst) b
|
||||
where extant = fst <$> a
|
||||
|
||||
unions :: Eq key => [OrderedMap key value] -> OrderedMap key value
|
||||
|
Loading…
Reference in New Issue
Block a user