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.




Prototype.i fun(x.i)
 
Procedure.i quark(z.i)
  Debug "Quark "+Str(z) : ProcedureReturn z-1
EndProcedure
 
Procedure rep(q.fun,n.i)
  Repeat : n=q(n) : Until n=0
EndProcedure
 
rep(@quark(),3)