RosettaCodeData/Task/Repeat/OCaml/repeat.ocaml
2023-07-01 13:44:08 -04:00

10 lines
128 B
Text

let repeat ~f ~n =
for i = 1 to n do
f ()
done
let func () =
print_endline "Example"
let () =
repeat ~n:4 ~f:func