| |
| |
Closure (computer science) - Wikipedia, the free encyclopedia |
 | | Closures are commonly used in functional programming to defer calculation, to hide state, and as arguments to higher-order functions. |
 | | Closures are typically implemented with a special data structure that contains a pointer to the function code, plus a representation of the function's lexical environment (i.e., the set of available variables and their values) at the time when the function was created. |
 | | Closures typically appear in languages in which functions are first-class values—in other words, such languages allow functions to be passed as arguments, returned from function calls, bound to variable names, etc., just like simpler types such as strings and integers. |
| en.wikipedia.org /wiki/Closure_(computer_science) (1380 words) |
|