[Haskell-cafe] Is there a library that has a strict version of `sum`?
Brandon Allbery
allbery.b at gmail.com
Tue Aug 14 17:59:05 UTC 2018
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 <damian.only at gmail.com> wrote:
>
>
> On Tue, Aug 14, 2018, 19:26 Tom Ellis <
> tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk> wrote:
>
>> On Tue, Aug 14, 2018 at 05:22:00PM +0200, Damian Nadales 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
>> 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 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180814/8b46ded3/attachment.html>
More information about the Haskell-Cafe
mailing list