Anonymous user
Nested function: Difference between revisions
→{{header|Tcl}}
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
proc MakeList separator {
|