Chapter 10
Standard Higher-Order Functions
Functional programming libraries typically define a common collection of higher-order functions that implement a core set of patterns. Developers can also implement their own higher-order functions to provide users with these standard patterns. Of particular interest are filter
, map
, and flatMap
, which have deep theoretical underpinnings and are supported with a dedicated syntax in some languages. Most code examples in this chapter focus on lists and options for simplicity, but higher-order functions are typically available on many other types.
10.1 Functions with Predicate Arguments
The theme of higher-order functions was motivated in Chapter 9 using a function find
, which takes as an argument a ...
Get Functional and Concurrent Programming: Core Concepts and Features now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.