You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -191,7 +191,7 @@ add2(10) // 12
191
191
## Closure
192
192
193
193
A closure is a way of accessing a variable outside its scope.
194
-
Formally, a closure is a technique for implementing lexically scopped named binding. It is a way of storing a function with an environment.
194
+
Formally, a closure is a technique for implementing lexically scoped named binding. It is a way of storing a function with an environment.
195
195
196
196
A closure is a scope which captures local variables of a function for access even after the execution has moved out of the block in which it is defined.
197
197
ie. they allow referencing a scope after the block in which the variables were declared has finished executing.
@@ -217,7 +217,7 @@ A closure is a function that encloses its surrounding state by referencing field
217
217
218
218
__Further reading/Sources__
219
219
*[Lambda Vs Closure](http://stackoverflow.com/questions/220658/what-is-the-difference-between-a-closure-and-a-lambda)
Transforming a function that takes multiple arguments into one that if given less than its correct number of arguments returns a function that takes the rest. When the function gets the correct number of arguments it is then evaluated.
0 commit comments