In GHCi, foldl (+) 0 [1..10000000] takes several seconds and the memory use climbs by hundreds of megabytes, although it is only adding numbers. People say to use foldl', and that foldr is the "natural" fold for lists, but foldr (+) 0 on the same list is no better.
What is going on with laziness here, and what is the rule for choosing between the three folds?




