Module IndexBuffer.GenSource

Sourcetype ('n, 'a) t
Sourcetype 'n reservation
Sourceval add : ('n, 'a) t -> 'a -> 'n Fix.Indexing.index
Sourceval reserve : ('n, 'a) t -> 'n reservation
Sourceval commit : ('n, 'a) t -> 'n reservation -> 'a -> unit
Sourceval get : ('n, 'a) t -> 'n Fix.Indexing.index -> 'a
Sourceval set : ('n, 'a) t -> 'n Fix.Indexing.index -> 'a -> unit
Sourceval freeze : ('n, 'a) t -> ('n, 'a) Fix.Indexing.vector

freeze t returns a vector containing all committed values of the generator. The generator must not be used after freezing.

Sourceval freeze_map : ('n, 'a) t -> ('n Fix.Indexing.index -> 'a -> 'b) -> ('n, 'b) Fix.Indexing.vector

freeze_map t f returns a vector by applying f to each index and value. The function receives the index and the associated value.

Sourcemodule Make () : sig ... end