
I suspect the only reason it includes sum at all is that the Report says it
must. Otherwise, well, it's a trivial fold and you can easily select the
strictness you want by how you phrase the fold.
On Tue, Aug 14, 2018 at 1:35 PM Damian
On Tue, Aug 14, 2018, 19:26 Tom Ellis < tom-lists-haskell-cafe-2017@jaguarpaw.co.uk> wrote:
Ok, so if understood the bottom line of the answers I got from Vanessa and Hiromi the take away seems to be: if you're prototyping then stick to
On Tue, Aug 14, 2018 at 05:22:00PM +0200, Damian Nadales wrote: the
lazy version of sum, otherwise use more advanced data structures (Vectors or Folds).
I can't say I understand that bottom line. A strict sum seems like a very obvious thing to want to feature very prominently in whatever set of utilities you choose to base your system on.
Any idea why Prelude does not ship a sum' version? (i.e. a strict version of sum)
_______________________________________________
Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com