Answer the question
In order to leave comments, you need to log in
Partial function call and currying. What is the difference?
Partial call:
def f(m: Int, n: Int) = m*n
val f3 = f(3, _:Int)
var result = f3(4)
def f(m: Int)(n: Int) = m*n
val f3 = f(3) _
var result = f3(4)
Answer the question
In order to leave comments, you need to log in
While partial application transforms a function with N parameters into a function with Nk parameters by applying one or more arguments, currying decomposes the function into functions of one argument while maintaining the sequence of arguments.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question