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 : ℕ → (ℕ → string) → string 
  | 0 f       := "done"
  | (n + 1) f :=  (f n) ++ (repeat n f) 
 
 
#eval repeat 5 $ λ b : ℕ , "me "
 