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.




open System
 
let Repeat c f =
    for _ in 1 .. c do
        f()
 
let Hello _ = 
    printfn "Hello world"
 
[<EntryPoint>]
let main _ =
    Repeat 3 Hello
 
    0 // return an integer exit code