[Haskell-cafe] curious about sum
Keith Sheppard
keithshep at gmail.com
Mon Jun 15 21:02:09 EDT 2009
I just realized... that was a statement not a question :-)
anyway, thanks
Keith
On Mon, Jun 15, 2009 at 11:14 AM, Don Stewart<dons at galois.com> wrote:
> keithshep:
>> Is there any reason that sum isn't strict? I can't think of any case
>> where that is a good thing.
>>
>> Prelude> sum [0 .. 1000000]
>> *** Exception: stack overflow
>>
>
> It is strict when subject to strictness analysis (try compiling it).
>
> -- Don
>
>
>
--
keithsheppard.name
More information about the Haskell-Cafe
mailing list