<div dir="ltr">-1 on retaining this. Part of the implied contract of Data.List is that all functions be as lazy as possible. Besides, a change that potentially breaks old programs that use foldl' seems like a bad idea unless there's a really strong reason for it. I don't have an existing example offhand, but it seems at least possible that something like<div><br></div><div>    last = foldl' (flip const) undefined</div><div><br></div><div>is out there...</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 10, 2016 at 5:29 AM David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">The semantics of foldl' for lists were changed between base 4.7 and base 4.8. Specifically, foldl' became strict in the initial value of its accumulator. I opened <a href="http://ghc.haskell.org/trac/ghc/ticket/12173" target="_blank">http://ghc.haskell.org/trac/ghc/ticket/12173</a> to report this. The change was entirely accidental, according to Joachim Breitner. However, Duncan Coutts indicated he is pleased with the change. I don't personally have a dog in this race, but I feel very strongly about three things:</p>
<p dir="ltr">1. The strictness should be fully documented, both in Haddock and the next Haskell Report (the Haskell 2010 Report does not go into sufficient detail to support either choice).</p>
<p dir="ltr">2. There should be *one* meaning of foldl' in base. Thus the default Foldable instance should match the ones for lists and arrays.</p>
<p dir="ltr">3. The containers package should be consistent with base in this regard.</p>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>