Slide 3
Slide 3 text
Currying and Partial Application
●
Currying is another operation on a function, that
converts a function of multiple parameters into a
series of functions of a single parameter:
f(x, y, z) → f(x)(y)(z)
●
Functions are automatically curried in several
functional languages, such as Haskell and F#.
●
A curried function is trivial to partially apply, as we
can just execute a subset of the functions:
f(2) → g(y, z) = f(x, y, z)
●
As such, currying and partial application are often
confused.