traverseWithKey f = fmap (map id) . Data.HashMap.Lazy.traverseWithKey fNote: the order in which the actions occur is unspecified. In particular, when the map contains hash collisions, the order in which the actions associated with the keys involved will depend in an unspecified way on their insertion order.