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.




fn repeat(n int, f fn()) {
  for _ in 0.. n {
    f()
  }
}
 
fn func() {
  println("Example")
}
 
fn main() {
  repeat(4, func)
}