[Haskell-cafe] definition of sum

TeXitoi texitoi at texitoi.eu
Wed Mar 10 16:33:43 EST 2010

After programming as an exercice the sum function, my version is
faster than the Data.List's version. Looking at the source code,
Data.List uses a foldl and not a foldl'. foldl' seems faster and
allows to use very big lists. So, why is foldl used by Data.List for

Guillaume Pinot               http://www.irccyn.ec-nantes.fr/~pinot/

« Les grandes personnes ne comprennent jamais rien toutes seules, et
c'est fatigant, pour les enfants, de toujours leur donner des
explications... » -- Antoine de Saint-Exupéry, Le Petit Prince

()  ASCII ribbon campaign      -- Against HTML e-mail
/\  http://www.asciiribbon.org -- Against proprietary attachments

More information about the Haskell-Cafe mailing list