[Haskell-cafe] Function Precedence
nornagon at gmail.com
Tue Apr 1 06:50:57 EDT 2008
On 01/04/2008, PR Stanley <prstanley at ntlworld.com> 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). 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.
Think about this:
map (+1) [1..10]
What should it do?
f 1 2 3
Should that be f (1 (2 3)), or ((f 1) 2) 3?
More information about the Haskell-Cafe