curry and related functions modify other functions by pre-setting
1 2 3 4 5
The function to curry or uncurry.
Arguments to be used in currying.
Strictly speaking, these functions do partial application rather than
currying, but they can be used to implement proper currying if desired, and
the abuse of terminology is common. For an introduction to the whole concept
of function currying and why it's useful, in more detail than we can give
here, see the ever-helpful
curry uses standard evaluation (i.e., does not implicitly quote its
substitute to avoid
evaluating its arguments before using them in currying.
uncurry takes a curried function - one resulting from a call to
lazy.curry - and undoes the currying, returning the
original function without pre-set arguments.
If currying is nested, one call to
uncurry can be made for each call
lazy.curry - attempting to uncurry a function more
times than it's been curried will raise an error.
lazy.curry, the curried function;
uncurry, the uncurried function. Note that
will raise an error if its argument did not result from a call to
Currying is named after the mathematician Haskell Curry.
compose, which is frequently useful in conjunction with the
currying and uncurrying functions.
1 2 3 4 5 6 7 8 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.