April 24, 2020
The Higher-Order Functions chapter wraps up the introductory part of my Functional Programming book.
Higher-order functions are functions that accept another function or return another function.
Although we don't talk about calculus in the book, those of you who took Calc are very familiar with higher-order functions.
The derivative is a higher-order function.
You calculate the derivative of a function and get back (if the function is differentiable) a function. We then usually evaluate that derivative at a point or solve for where that derivative is 0 or something like that.
You've calculated that the derivative of x squared is 2x so many times that you probably don't think of the derivative as accepting a function (in this case x squared) and returning a function (2x).
It's natural and it's important. And that's what chapter 3 is all about.
If you own the book, the chapter 3 update is available for free on Gumroad. If not, what are you waiting for? You can buy it at A Functional Programming Kickstart. And I'm still offering a discount if you need one.