[Haskell-cafe] Two-iteration optimisation (was: GHC
lrpalmer at gmail.com
Fri May 16 00:04:05 EDT 2008
On Thu, May 15, 2008 at 8:45 PM, Andrew Coppin
<andrewcoppin at btinternet.com> wrote:
> Yitzchak Gale wrote:
>> And of course, you wouldn't want that:
>> f xs = xs : map expensiveCalculation xs
>> Please don't fuse those two loops into one.
> ...doesn't type check. Did you mean (++)?
Hmm? While the name might be misleading...
expensiveCalculation = (:)
More information about the Haskell-Cafe