package interval-map

  1. Overview
  2. Docs
type 'a t
val next : 'a t -> ((Interval.t * 'a list) * 'a t) option

next gen retrieves the next interval and associated values of gen along with the updated state of the generator or None if the generator is exhausted.

val fold : ('acc -> Interval.t -> 'a list -> 'acc) -> 'acc -> 'a t -> 'acc

fold fn acc gen folds over gen using function fn, which takes the accumulator, interval, and values as parameters and returns the updated accumulator.

OCaml

Innovation. Community. Security.