Jump to content

Nested function: Difference between revisions

Line 849:
 
=={{header|Tcl}}==
The code below satisfies the specification (inspired by the Swift example). The inner function MakeItem (which gains read/write access to its caller's variables via upvar) is defined, called, and then discarded by renaming to {}. suchenwi
<lang Tcl>#!/usr/bin/env tclsh
#!/usr/bin/env tclsh
 
proc MakeList separator {
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.