package fmlib

  1. Overview
  2. Docs
Functional monadic library

Install

Dune Dependency

Authors

Maintainers

Sources

0.1.0.tar.gz
sha256=0558665285e4d7691e5a80c90ab05a7acb86c09f03ceef6589f150f6d3574573
md5=fb61f4d6e7233cf8d1d71758e6110c1e

doc/src/fmlib.fmlib_std/int.ml.html

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.