Chapter 5. Higher-Order Functions

Haskell functions can take functions as parameters and return functions as return values. A function that does either of these things is called a higher-order function. Higher-order functions are a really powerful way of solving problems and thinking about programs, and they’re indispensable when using a functional programming language like Haskell.

Curried Functions

Every function in Haskell officially takes only one parameter. But we have defined and used several functions that take more than one parameter so far—how is that possible?

image with no caption

Well, it’s a clever trick! All the functions we’ve used so far that accepted multiple ...

Get Learn You a Haskell for Great Good! now with O’Reilly online learning.

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