Summary
In this chapter, we have considered a new way of producing functions, by fixing arguments to an existing function in several different ways: currying—which originally came from computer theory; partial application—which is more flexible; and partial currying, which combines good aspects from both of the previous methods. Using these transformations, you can simplify your coding, because you can generate more specialized versions of general functions, without any hassle.
In Chapter 8, Connecting Functions – Pipelining and Composition, we will turn back to some concepts we looked at in the chapter on pure functions, and we will consider ways of ensuring that functions cannot become impure by accident, by seeking ways to make their arguments ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access