A function closes over the bindings in scope where it was created. |
|
The closed-over value is the binding's value. A closure can also close over a collection and hand back a view of it. |
|
The returned function keeps the values it closed over. |
|
Next example: Recursion.