@@ -170,8 +170,8 @@ fromList :: (Eq k, Hashable k, Monoid a) => [(k,a)] -> MonoidalHashMap k a
170170fromList = pack . M.fromListWith mappend
171171{-# INLINE fromList #-}
172172
173−-- | /O(n*log n)/. Construct a map with the supplied mappings. If the list
174−-- contains duplicate mappings, the later mappings take precedence.
173+-- | /O(n*log n)/. Return a list of this map's elements. The list is produced
174+-- lazily. The order of its elements is unspecified.
175175toList :: MonoidalHashMap k a -> [(k,a)]
176176toList = M.toList . unpack
177177{-# INLINE toList #-}
@@ -198,7 +198,8 @@ modifyDef d f k = pack
198198 . unpack
199199{-# INLINE modifyDef #-}
200200
201−-- | /O(n)/. Map a function to each key of a map
201+-- | /O(n)/. Map a function to each key of a map, if it will result
202+-- in duplicated mappings, their values will be merged in unspecified order
202203mapKeys :: (Monoid a, Hashable k, Eq k, Hashable k', Eq k')
203204 => (k -> k') -> MonoidalHashMap k a -> MonoidalHashMap k' a
204205mapKeys f = fromList