Implement foldMap in order to minimize calls to the semigroup op.