package base
Module Hash_set.PolySource
A hash set that uses polymorphic comparison
include Creators_generic
with type 'a t := 'a t
with type 'a elt = 'a
with type ('key, 'z) create_options :=
('key, 'z) create_options_without_first_class_module
include Accessors with type 'a t := 'a t with type 'a elt := 'a elt
include Container.Generic
with type ('a, _) t := 'a t
with type 'a elt := 'a elt
Source
val fold_until :
'a t ->
init:'acc ->
f:('acc -> 'a elt -> ('acc, 'final) Container.Continue_or_stop.t) ->
finish:('acc -> 'final) ->
'finalSource
val sum :
(module Container.Summable with type t = 'sum) ->
'a t ->
f:('a elt -> 'sum) ->
'sumstrict_add t x returns Ok () if the x was not in t, or an Error if it was.
strict_remove t x returns Ok () if the x was in t, or an Error if it was not.
inter t1 t2 computes the set intersection of t1 and t2. Runs in O(min(length t1, length t2)). Behavior is undefined if t1 and t2 don't have the same equality function.