package prbnmcn-basic-structures

  1. Overview
  2. Docs

Abstraction for loops.

type 'a m
type index

The type of loop indices.

val for_ : start:index m -> stop:index m -> (index m -> unit m) -> unit m

for_ ~start ~stop f is a for loop, iterating f in the interval [start;stop] in order.

val while_ : cond:(unit -> bool m) -> (unit -> unit m) -> unit m

While loop.


Innovation. Community. Security.