16 Jun
2009
16 Jun
'09
5:01 p.m.
On 16 Jun 2009, at 05:18, Don Stewart wrote:
keithshep:
The answer is sometimes (only if you use an optimize flag):
You're turning on the strictness analyser. That's enabled with -O or -O2.
But sum should be using a tail recursive foldl'. It's a bug in the H98 report, IMO.
Not at all, as discussed, there are legitimate uses for a lazy sum, and haskell is a lazy language by default. The only change here needs to be either claus' suggestion of generalizing functions over their application operator, or providing a strict sum'. Bob