...

/

Functions are Data

Functions are Data

Let’s learn how functions can be used as data.

Using functions as data

The generators in the previous example illustrate an underappreciated aspect of functional programming. Namely, functions are just another datatype.

Anywhere we can pass some data as an argument, we can pass a function instead. The BEAM even serializes ...