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(f,n)
    for i in range(1, n)
        f()
    end
end
 
def procedure()
    println "Example"
end
 
repeat(procedure, 3)