Chapter 6. Higher-Order Functions
An important part of all functional programming languages is the ability to take a function you defined and then pass it as a parameter to another function. This binds that function parameter to a variable, which can be used like any other variable within the function. A function that can accept other functions transported around this way is called a higher-order function. As you’ll learn in this chapter, higher-order functions are a powerful means of abstraction and one of the best tools to master in Erlang.
Let’s Get Functional
The concept behind carrying functions around and passing them to higher-order functions is rooted in mathematics, mainly lambda calculus. Basically, in pure lambda calculus, everything ...