Implement foldMap on Data.Sequence.Seq?
sjoerd at w3future.com
Sat Nov 5 14:04:31 CET 2011
When experimenting with the code here:
it turned out that foldMapDefault from traversable was more than 2x faster than foldl', and more than 6x faster than foldMap.
foldMap is not implemented by Data.Seq, so it defaults to foldr (mappend . f) mempty.
Does anybody have a good explanation for the StackOverflow question, and would it be a good idea to add a foldMap implementation to Seq?
More information about the Libraries