[Haskell-cafe] let and fixed point operator
andrewcoppin at btinternet.com
Fri Aug 31 14:47:06 EDT 2007
Paul Hudak wrote:
> ok wrote:
>> What is so bad about
>> f x = g x''
>> where x'' = x' + transform
>> x' = x * scale
>> (if you really hate inventing temporary names, that is).
> There's nothing at all wrong with this, assuming it's what you meant
> to type :-), and it might even correspond perfectly to the
> mathematical notation used in some textbook. But I would argue that
> this example is pretty simple, and that if there were a lot of xs and
> x's and x''s then the chance of making a typing mistake is greater, I
> believe, than if you had used x, xscaled, and xtransformed. (On the
> other hand this is all pretty subjective... :-)
OMG! "Mathematical" and "subjective" in the same sentence! ;-)
Personally, I find that if I've got more than 2 of the thing, I number
them rather than attach multiple primes... but that's just me.
More information about the Haskell-Cafe