Glossary: Software Design Patterns
Closure
Also written: inner function
A function defined inside another that remembers the outer function's values after it returns. `percent_off(10)` returns a `discount` function that remembers `pct`.
Glossary: Software Design Patterns
Also written: inner function
A function defined inside another that remembers the outer function's values after it returns. `percent_off(10)` returns a `discount` function that remembers `pct`.