OK, first of all, I am admitting that I am not experienced with Scala at all, After buying Venkat's book, which I must admit is really hot! I tried a few things in first 4-5 chapters I guess (this is more of coding and less of reading ... ), anyways, I was able to intuitively (beauty of Scala?) do anonymous functions and invoke them, however i can't figure out how do i define a lambda expression so as to speak, or something which takes function as an argument or returns a function or both... the whole notation (I decided to not read by skipping chapters, (there's a functions chapter in the book ...), but couldn't resist doing it myself first =) .. I wrote this but it didn't compile:
Looks like currying is something different than what you where trying to accomplish.
Currying is simply the transformation of a function with multiple parameters into another function with only one parameter that returns a function of the remaining parameters.
In Scala, if you want to write curried functions, you just separate the parameters with parenthesis.
If the normal(uncurried) function is: