https://github.com/haskell/containers/blob/734785d2d3ee862726c6c5bb30e6484fff370e50/containers/src/Data/Map/Internal.hs#L3208-L3209 https://github.com/haskell/containers/blob/734785d2d3ee862726c6c5bb30e6484fff370e50/containers/src/Data/Map/Internal.hs#L3227-L3228 https://github.com/haskell/containers/blob/734785d2d3ee862726c6c5bb30e6484fff370e50/containers/src/Data/Map/Strict/Internal.hs#L1454-L1455 https://github.com/haskell/containers/blob/734785d2d3ee862726c6c5bb30e6484fff370e50/containers/src/Data/IntMap/Internal.hs#L2578-L2579 https://github.com/haskell/containers/blob/734785d2d3ee862726c6c5bb30e6484fff370e50/containers/src/Data/IntMap/Internal.hs#L2593-L2595 https://github.com/haskell/containers/blob/734785d2d3ee862726c6c5bb30e6484fff370e50/containers/src/Data/IntMap/Strict/Internal.hs#L983-L984 It would be more efficient to skip the intermediate list and `foldl'` over the map accumulating into another map. An exception here is `Map.mapKeys`, since `Map.fromList` is O(n) on an already sorted list. This raises a related question of whether `fromListWith` should also have such an optimization.