Scala Language Currying

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9

Syntax

  • aFunction(10)_ //Using '_' Tells the compiler that all the parameters in the rest of the parameter groups will be curried.
  • nArityFunction.curried //Converts an n-arity Function to an equivalent curried version
  • anotherFunction(x)(_: String)(z) // Currying an arbitrary parameter. It needs its type explicitly stated.


Got any Scala Language Question?