## Functional composition and currying

Some functional languages work by transforming a multiargument function syntax into a collection of single argument functions. This process is called **currying**:** **it's named after logician Haskell Curry, who developed the theory from earlier concepts.

Currying is a technique for transforming a multiargument function into higher-order single argument functions. In a simple case, consider a function

; given two arguments *x* and *y*; this will return some resulting value, *z*. We can curry

into into two functions:

and

. Given the first argument value, *x*, evaluating the function

returns a new one-argument function,

. This second function can be given the second argument value, *y*, and it returns the desired result, *z*.

We can evaluate a curried function in Python as follows: `f_c(2)(3)`

. We apply the curried function to the first argument value of `2`

, creating a new function. Then, we apply that new function to the second argument value of `3`

.

This applies to functions...