Module Diet.Make
Parameters
Signature
type elt
= Elt.t
The type of the set elements
type interval
An interval: a range (x, y) of set values where all the elements from x to y inclusive are in the set
module Interval : sig ... end
val pp : Stdlib.Format.formatter -> t -> unit
Pretty-print a set
val empty : t
The empty set
val is_empty : t -> bool
Test whether a set is empty or not
val fold : (interval -> 'a -> 'a) -> t -> 'a -> 'a
fold f t acc
foldsf
across all the intervals int
val fold_individual : (elt -> 'a -> 'a) -> t -> 'a -> 'a
fold_individual f t acc
foldsf
across all the individual elements oft
val min_elt : t -> interval
min_elt t
returns the smallest (in terms of the ordering) interval int
, or raisesNot_found
if the set is empty.
val max_elt : t -> interval
max_elt t
returns the largest (in terms of the ordering) interval int
, or raisesNot_found
if the set is empty.