Task

Write a procedure which accepts as arguments another procedure and a positive integer.

The latter procedure is executed a number of times equal to the accepted integer.




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