:: (a -> Int) -> [a] -> Int package:universum

This function may be used as a value for foldMap in a Foldable instance.
foldMapDefault f ≡ getConst . traverse (Const . f)