RosettaCodeData/Task/Repeat/Tcl/repeat-1.tcl

9 lines
170 B
Tcl

proc repeat {command count} {
for {set i 0} {$i < $count} {incr i} {
uplevel 1 $command
}
}
proc example {} {puts "This is an example"}
repeat example 4