Slide 13
Slide 13 text
CURRYING
A technique for partial function application.
Allows the conversion of a function of multiple parameters
into a chain of functions that accept one or more
parameters.
In Scala, any function of multiple parameters can be curried.
scala> val multipleParams = (x: Int, y: Double, z: String) => x + y + z
multipleParams: (Int, Double, String) => String = < function3 >
scala> val separateParams = multipleParams.curried
separateParams: Int => (Double => (String => String)) = < function1 >