tailcall
tailcall command ?arg ...?
Ends the proc and runs the command in its place, so that the stack does not grow. The result of the command is the result of the proc.
Examples
A click on an example runs it in the shell of the page.
proc down {n} {if {$n == 0} {return done}; tailcall down [incr n -1]}; down 100000:done
Facts
- Capability: none.
- Compute cost: one compute unit for the call, and more for the commands that it runs.