foldMap package:unordered-containers

Reduce the map by applying a function to each element and combining the results with a monoid operation.