Implement foldMap on Data.Sequence.Seq?

5 Nov
2011
5 Nov
'11
9:04 a.m.
When experimenting with the code here: http://stackoverflow.com/questions/7869359/why-is-it-faster-to-sum-a-data-se... 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? greetings, Sjoerd Visscher
4948
Age (days ago)
4948
Last active (days ago)
0 comments
1 participants
participants (1)
-
Sjoerd Visscher