diff --git a/src/OrderedMap.hs b/src/OrderedMap.hs index bf1b51132..eec0de1fe 100644 --- a/src/OrderedMap.hs +++ b/src/OrderedMap.hs @@ -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