by AmbientLion · 11y ago · 0 comments
A good example is the derivative function from calculus, which could be specified in at least two obvious ways. A simple, but ugly solution is to have it take a function and a point as arguments and return the value of the derivative at that point.
Alternatively, it could take a function and return its derivative as a function, which could then be evaluated at many different points.
This is the difference between e.g.
(Float -> Float, Float) -> Float, and (Float -> Float) -> (Float -> Float).
Taking this idea to its logical conclusion and applying it to any multiple argument function gives you currying.