Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SCALA

currying scala

val sum: (Int, Int) => Int = (x, y) => x + y 
val curriedSum: Int => Int => Int = x => y => x + y
curriedSum(1)(2) shouldBe 3
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #currying #scala
ADD COMMENT
Topic
Name
2+4 =