Source file Fun.ml

1
2
3
4
5
6
7
8
include Stdlib.Fun

let rec repeat n f x =
  if n > 0 then
    f x |> repeat (n - 1) f
  else
    x