[Haskell-cafe] Function Precedence
voigt at tcs.inf.tu-dresden.de
Tue Apr 1 06:48:20 EDT 2008
PR Stanley wrote:
> f x = x
> g y = y
> f g x
> returns an error because f takes only one argument. Why can't we have
> function application implemented outwardly (inside-out).
Why should it be so?
> f g x would be applied with
> gx first followed by its return value passed to f instead of putting g x
> in brackets.
You can get the same behavior with
f . g $ x
if you mislike brackets.
Dr. Janis Voigtlaender
mailto:voigt at tcs.inf.tu-dresden.de
More information about the Haskell-Cafe