<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 14, 2018 at 8:08 PM Bryan Richter <<a href="mailto:b@chreekat.net">b@chreekat.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 08/14/2018 11:22 AM, Damian Nadales wrote:<br>
<br>
> Ok, so if understood the bottom line of the answers I got from<br>
> Vanessa and Hiromi the take away seems to be: if you're prototyping<br>
> then stick to the lazy version of sum, otherwise use more advanced<br>
> data structures (Vectors or Folds).<br>
<br>
Are you implying that lazy functions are only good for prototyping? Or<br></blockquote><div>No. I know lazy functions can be quite useful. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
is there something wrong with sum in particular?<br>
<br></blockquote><div>From the point of view of somebody that is not that bright, like myself, it seems. Why would you need to build a huge thunk containing the representation of a sum of values. It is not that you can pattern match on integers or consume the sum incrementally.</div><div><br></div><div>I apologize if I infuriate people, but I really don't get the usefulness of a lazy sum function. <br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
More generally, why isn't sum working for you?<br>
<br></blockquote><div>Because if I want to test my function with 100000000 values it consumes a lot of memory.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div></div>