How does currying work with lambdas in Haskell?

Viewed 264

Just looking at learn you a Haskell (great work) and under the section curried functions there is an example that says the following two functions are the same:

addThree x y z = x + y + z  
addThree = \x -> \y -> \z -> x + y + z  

What confuses me here is how currying is applied to lambda(s). With the type of the function being

addThree :: (Num a) => a -> a -> a -> a  

When lambdas are used is the function equal to \x -> (\y -> (\z -> x + y + z)) ? If this is the case, then is x + y treated as a constant in the innermost lambda? That is, \z -> c + z where c is x + y ?

1 Answers
Related