One particular example that I recall was that if you calculate something like<p><pre><code>    foldl (+) 0 [1..1000000]
</code></pre>
(i.e. calculate the sum of the first 1000000 natural numbers)<p>Then the obvious way to do it is to simply keep a running total, but haskell doesn&#x27;t do that, it constructs the expression:<p><pre><code>    (...((1+2)+3)+4)+5)+...)+1000000)
</code></pre>
And tries to evaluate that, which tends to cause stack overflows, and is just generally slow. To fix it you have to use the following expression instead:<p><pre><code>    foldl&#x27; (+) 0 [1..1000000]
</code></pre>
This problem is described in more detail here: <a href="https:&#x2F;&#x2F;wiki.haskell.org&#x2F;Foldr_Foldl_Foldl&#x27;" rel="nofollow">https:&#x2F;&#x2F;wiki.haskell.org&#x2F;Foldr_Foldl_Foldl&#x27;</a>