Hi,<br><br>I came upon this when playing with foldr and filter. Compare the two definitions:<br><br>testr  n = foldr (\x y -&gt; x &amp;&amp; y) True [t | (_, t) &lt;- zip [1 .. n] [True, True ..]]<br>testr&#39; n = foldr (\x y -&gt; y &amp;&amp; x) True [t | (_, t) &lt;- zip [1 .. n] [True, True ..]]<br>
<br>I tried these functions on ghci (The Glorious Glasgow Haskell Compilation System, version 7.0.3), and get the following results (with :set +s):<br><br>testr 1000000 =&gt; True<br>(0.01 secs, 7920832 bytes)<br>testr&#39; 1000000 =&gt; True<br>
(8.72 secs, 446585344 bytes)<br><br>This bizarre (at least to me) behavior also applies to ||. Should I mind the orderings of the parameters (especially the accumulator) in the function passed to foldr?<br><br>Thak you for reading.<br>
<br>Sincerely yours,<br>Frodo Chao<br><br>