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);