[Haskell-cafe] let and fixed point operator

Paul Hudak paul.hudak at yale.edu
Fri Aug 31 12:00:41 EDT 2007

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... :-)


More information about the Haskell-Cafe mailing list