Wrong documentation for `foldMap`/`foldMap'`?
The doc comments for foldMap
and foldMap'
currently say that they're right-associative and left-associative, respectively. However, as I understand it, that should only apply for the default implementations (which are using foldr
and foldl'
, respectively).
The point of foldMap
/foldMap'
(and Monoid
s in general) is that <>
/mappend
is associative, so it doesn't make sense to me to enforce that they need a specific associativity. Additionally, if they always had to be right-/left-associative, I don't see why they should be class methods, since I don't think there would be a better implementation than the default one.