Nested function: Difference between revisions

Mark as draft, move reference link to top
(Lua)
(Mark as draft, move reference link to top)
Line 1:
 
{{draft task}}
 
In many languages, functions can be nested, so there are outer functions and inner functions. The inner function can then access the variables of the outer function. In most languages, the inner function can also modify variables from the outer function.
 
*See: [https://en.wikipedia.org/wiki/Nested_function Wikipedia]: articleNested onfunction] nested functionsarticle.
 
 
The following examples for <tt>MakeList</tt> or <tt>makeList</tt> generate the following text:
Line 55 ⟶ 61:
print(makeList(". "))
</lang>
 
== References ==
* [https://en.wikipedia.org/wiki/Nested_function Wikipedia] article on nested functions
10,351

edits