Higher-order functions don't just receive functions as inputs—they can also produce new functions as outputs. They're even able to enclose a reference to a value into the function they generate. We call that a closure. A function that has a closure "remembers" stuff and can access the environment of its enclosed values.

