package accessor_base

  1. Overview
  2. Docs
val at : 'key -> (_, Base.bool, ('key, 'cmp) Base.Set.t, [< Accessor_base__.Import.field ]) Accessor.Simple.t

Access the existence of a key in a set. true means the key is present, and false means it is absent.

val ati : 'key -> (('key * 'i) -> Base.bool -> Base.bool, 'i -> ('key, 'cmp) Base.Set.t -> ('key, 'cmp) Base.Set.t, [< Accessor_base__.Import.field ]) Accessor.t

The indexed version of at adds the given key to the index.

val found : 'key -> (_, Base.unit, ('key, 'cmp) Base.Set.t, [< Accessor_base__.Import.optional ]) Accessor.Simple.t

Access () iff the set contains the given key.

val foundi : 'key -> (('key * 'i) -> Base.unit -> Base.unit, 'i -> ('key, 'cmp) Base.Set.t -> ('key, 'cmp) Base.Set.t, [< Accessor_base__.Import.optional ]) Accessor.t

The indexed version of found adds the given key to the index.

val each : ('i -> 'key -> _, 'i -> ('key, 'cmp) Base.Set.t -> _, [< Accessor_base__.Import.many_getter ]) Accessor.t

Access every element in a set.

val empty_default : ('k1, 'cmp1) Base.Set.comparator -> ('i -> ('k1, 'cmp1) Base.Set.t -> ('k2, 'cmp2) Base.Set.t, 'i -> ('k1, 'cmp1) Base.Set.t Base.option -> ('k2, 'cmp2) Base.Set.t Base.option, [< Accessor_base__.Import.isomorphism ]) Accessor.t

Treat None equivalently with the empty set. This accessor is not well-behaved, as it violates construct (get at) = at:

construct (get (Some Foo.Set.empty)) = construct Foo.Set.empty = None

val of_accessor : ('a, 'cmp) Base.Set.comparator -> (Base.unit -> 'a -> _, Base.unit -> 'at -> _, [> Accessor_base__.Import.many_getter ]) Accessor.t -> 'at -> ('a, 'cmp) Base.Set.t

of_accessor (module M) accessor x is a M.Set.t that contains everything accessed by accessor in x.