Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Nested-function/Tcl/nested-function.tcl
Normal file
15
Task/Nested-function/Tcl/nested-function.tcl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env tclsh
|
||||
|
||||
proc MakeList separator {
|
||||
set counter 1
|
||||
proc MakeItem string {
|
||||
upvar 1 separator separator counter counter
|
||||
set res $counter$separator$string\n
|
||||
incr counter
|
||||
return $res
|
||||
}
|
||||
set res [MakeItem first][MakeItem second][MakeItem third]
|
||||
rename MakeItem {}
|
||||
return $res
|
||||
}
|
||||
puts [MakeList ". "]
|
||||
Loading…
Add table
Add a link
Reference in a new issue