Library
Module
Module type
Parameter
Class
Class type
String sets.
include Stdlib.Set.S with type elt := string and type t := set
val empty : set
val is_empty : set -> bool
val mem : string -> set -> bool
val singleton : string -> set
val iter : (string -> unit) -> set -> unit
val fold : (string -> 'a -> 'a) -> set -> 'a -> 'a
val for_all : (string -> bool) -> set -> bool
val exists : (string -> bool) -> set -> bool
val cardinal : set -> int
val elements : set -> string list
val min_elt_opt : set -> string option
val max_elt_opt : set -> string option
val choose_opt : set -> string option
val find_opt : string -> set -> string option
val find_first : (string -> bool) -> set -> string
val find_first_opt : (string -> bool) -> set -> string option
val find_last : (string -> bool) -> set -> string
val find_last_opt : (string -> bool) -> set -> string option
val to_seq_from : string -> set -> string Stdlib.Seq.t
val to_seq : set -> string Stdlib.Seq.t
val to_rev_seq : set -> string Stdlib.Seq.t
val of_seq : string Stdlib.Seq.t -> set
type t = set
val min_elt : set -> string option
Exception safe Set.S.min_elt
.
val max_elt : set -> string option
Exception safe Set.S.max_elt
.
val choose : set -> string option
Exception safe Set.S.choose
.
val find : string -> set -> string option
Exception safe Set.S.find
.
val get : string -> set -> string
get
is like Set.S.find
but
val of_list : string list -> set
of_list ss
is a set from the list ss
.
val of_stdlib_set : Stdlib.Set.Make(Stdlib.String).t -> set
of_stdlib_set s
is a set from the stdlib-compatible set s
.
val to_stdlib_set : set -> Stdlib.Set.Make(Stdlib.String).t
to_stdlib_set s
is the stdlib-compatible set equivalent to s
.
val pp :
?sep:(Stdlib.Format.formatter -> unit -> unit) ->
(Stdlib.Format.formatter -> string -> unit) ->
Stdlib.Format.formatter ->
set ->
unit
pp ~sep pp_elt ppf ss
formats the elements of ss
on ppf
. Each element is formatted with pp_elt
and elements are separated by ~sep
(defaults to Format.pp_print_cut
. If the set is empty leaves ppf
untouched.
val dump : Stdlib.Format.formatter -> set -> unit
dump ppf ss
prints an unspecified representation of ss
on ppf
.