The first definition is curried so you can provide a and b at a different time.
For example, if you know the function that you want to use in the current method, but do not yet know the arguments, you can use it like this:
def mySum(v: Int): Int = v + 1 val newsum = sum(mySum) _
At this point, newsum is a function that takes two Int and returns Int .
In the context of summation, this does not seem to make much sense; however, there were many times when I wanted to return different algorithms for parts of the program, based on what I know now, but do not yet know (or do not have access) to the parameters.
Currying buys you this feature.
source share