Hereby, I would like to understand the difference between:
val aCurriedfunc: Int => String => String = x => y => x + " " + y
aCurriedfunc (2)
and
def aCurriedMethod (x:Int) (y: String) = x + " " + y
aCurriedMethod (2) _
Indeed why is it that the first case required no "_" but the second case requires it. Yes one is a function with a type and the other a method which has no real type in Sscala from what I understood. However this distinction just lead me to a second question.
- Does any of this has something to do with eta expansion?
If yes
- How to distinguish between partially applied function and eta expansion?