Sized.MakeSizedSet
This module implements a sized-set data-structure.
This module has the same interface as Stdlib
.Set but with a different performance trade-off:
The cardinal function is much more efficient, but all other functions are a little bit slower. You should use this module if you need to call the cardinal
function often. You should stick to Stdlib
.Set otherwise.
module Set : Mavryk_error_monad.TzLwtreslib.Set.S
All the types and functions from the underlying Sets are supported.
The functions union
and inter
are less efficient than TzLwtreslib
.Set.S.union and TzLwtreslib
.Set.S.inter which should be considered instead, especially in case there are called several times. to_set
and of_set
can be used for this purpose.
include Mavryk_error_monad.TzLwtreslib.Set.S with type elt = Set.elt
type elt = Set.elt
val empty : t
val is_empty : t -> bool
val cardinal : t -> int
val iter_ep :
(elt -> (unit, 'error Mavryk_error_monad.TzTrace.trace) Stdlib.result Lwt.t) ->
t ->
(unit, 'error Mavryk_error_monad.TzTrace.trace) Stdlib.result Lwt.t