package fmlib_std

  1. Overview
  2. Docs

Source file int.ml

1
2
3
4
5
6
7
8
9
10
11
include Stdlib.Int


let iterate (n: t) (f: 'a -> 'a) (start: 'a): 'a =
    let rec iter n v =
        if n = 0 then
            v
        else
            iter (n - 1) (f v)
    in
    iter n start
OCaml

Innovation. Community. Security.