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.




func rep(callback:function,amount:number,*args:array=[]):null{
	repeat amount {
		callback(*args);
	}
}
 
rep(func(a,b,c){
	log(a+b+c);
},3,1,2,3);