I am trying to understand lambda functions (i.e. anonymous functions) in Haskell by writing a few simple functions that use them.

In the following example, I am simply trying to take in 3 parameters and add two of the three using an anonymous function and adding the third parameter after that. I am getting an error saying that I must declare an instance first.

specialAdd x y z = (\x y -> x + y) + z

I appreciate any explanation of why my example is not working and/or any explanation that would help me better understand lambda functions.

Edit
Report