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.




function repeat(f,n) {
	for (i=1; i<=n; i++) (*f)()
}
 
function hello() {
	printf("Hello\n")
}
 
repeat(&hello(),3)