Implement foldMap.