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[A](n:Int)(f: => A)= ( 0 until n).foreach(_ => f)
 
  repeat(3) { println("Example") }