The name Currying may seem obscure but the technique is named after Haskell Curry (for whom the Haskell programming language is named). Grouping of Parameters together is called Currying.
A currying function is a
transforming function with multiple arguments transformed into single arguments. A currying function takes two
arguments into a function that takes only a single argument.
There are two syntaxes to define the currying functions in Scala.
def functionName (arg1) = (arg2) => operation
def
functionName(arg1) (arg2) = operation
The first single argument is the original function argument. This
function returns another function that takes the second of the original
function. This chaining continuous for all arguments of the function.
The last function in this chain does the actual word of the
function call.
