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.




def repeat (function f, int n)
	for (set n n) (> n 0) (dec n)
		f
	end for
end repeat
 
def procedure ()
	out "Hello! " console
end procedure
 
# outputs "Hello! " 5 times
repeat procedure 5