Module Loko.Builder

Imperative builder.

type ('y, 'ys) t =
  1. | T : {
    1. empty : unit -> 'builder;
    2. add : 'builder -> 'y -> unit;
    3. finish : 'builder -> 'ys;
    } -> ('y, 'ys) t

A builder accumulates elements of type 'y one-by-one to produce a collection of type 'ys.