Chapter 8

Currying and Higher-Order Functions

[T]here are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.

— Tony Hoare, 1980 ACM A. M. Turing Award Lecture

THE concept of static typing leads to type inference and type signatures for functions (all of which are covered in Chapter 7), which lead to the concepts of currying and partial function application, which we discuss in this chapter. All of these concepts are integrated in the context of higher-order functions, which also provide us with tools and techniques for constructing well-designed and -factored software systems, including interpreters (which we build in Chapters 10—12). The programming languages ML and Haskell are ideal vehicles through which to study and explore these additional typing concepts.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.188.95