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:

Get Functional Python Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.