[Haskell-cafe] Currying: The Rationale
Philippa Cowderoy
flippa at flippac.org
Tue May 22 22:22:44 EDT 2007
On Wed, 23 May 2007, PR Stanley wrote:
> Hi
> What is the rationale behind currying? is it for breaking subroutines into
> pure one-to-one mappings?
We don't have 'subroutines' as such, but otherwise yes. Also, it gives us
partial application - we don't have to apply all the parameters at once,
and we can do interesting and useful things by applying only some to get a
new function.
> If f x y = f x -> a function which takes y for
> argument then does that mean that the second function already has value x, as
> it were, built into it?
Yep, though I can't make sense of what your syntax is supposed to mean.
--
flippa at flippac.org
Society does not owe people jobs.
Society owes it to itself to find people jobs.
More information about the Haskell-Cafe
mailing list