package base

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include Container.Generic_phantom with type ('a, 'b) t := ('a, 'b) T.t with type 'a elt := 'a Elt.t
val length : (_, _) T.t -> int
val is_empty : (_, _) T.t -> bool
val iter : ('a, _) T.t -> f:('a Elt.t -> unit) -> unit
val fold : ('a, _) T.t -> init:'accum -> f:('accum -> 'a Elt.t -> 'accum) -> 'accum
val fold_result : ('a, _) T.t -> init:'accum -> f:('accum -> 'a Elt.t -> ('accum, 'e) Result.t) -> ('accum, 'e) Result.t
val exists : ('a, _) T.t -> f:('a Elt.t -> bool) -> bool
val for_all : ('a, _) T.t -> f:('a Elt.t -> bool) -> bool
val count : ('a, _) T.t -> f:('a Elt.t -> bool) -> int
val sum : (module Commutative_group.S with type t = 'sum) -> ('a, _) T.t -> f:('a Elt.t -> 'sum) -> 'sum
val find : ('a, _) T.t -> f:('a Elt.t -> bool) -> 'a Elt.t option
val find_map : ('a, _) T.t -> f:('a Elt.t -> 'b option) -> 'b option
val to_list : ('a, _) T.t -> 'a Elt.t list
val to_array : ('a, _) T.t -> 'a Elt.t array
val invariants : ('a, 'cmp, ('a, 'cmp) T.t -> bool) Options.t
val mem : ('a, 'cmp, ('a, 'cmp) T.t -> 'a Elt.t -> bool) Options.t

override Container's mem

val add : ('a, 'cmp, ('a, 'cmp) T.t -> 'a Elt.t -> ('a, 'cmp) T.t) Options.t
val remove : ('a, 'cmp, ('a, 'cmp) T.t -> 'a Elt.t -> ('a, 'cmp) T.t) Options.t
val union : ('a, 'cmp, ('a, 'cmp) T.t -> ('a, 'cmp) T.t -> ('a, 'cmp) T.t) Options.t
val inter : ('a, 'cmp, ('a, 'cmp) T.t -> ('a, 'cmp) T.t -> ('a, 'cmp) T.t) Options.t
val diff : ('a, 'cmp, ('a, 'cmp) T.t -> ('a, 'cmp) T.t -> ('a, 'cmp) T.t) Options.t
val symmetric_diff : ('a, 'cmp, ('a, 'cmp) T.t -> ('a, 'cmp) T.t -> ('a Elt.t, 'a Elt.t) Either.t Sequence.t) Options.t
val compare_direct : ('a, 'cmp, ('a, 'cmp) T.t -> ('a, 'cmp) T.t -> int) Options.t
val equal : ('a, 'cmp, ('a, 'cmp) T.t -> ('a, 'cmp) T.t -> bool) Options.t
val is_subset : ('a, 'cmp, ('a, 'cmp) T.t -> of_:('a, 'cmp) T.t -> bool) Options.t
val subset : ('a, 'cmp, ('a, 'cmp) T.t -> ('a, 'cmp) T.t -> bool) Options.t
  • deprecated [since 2016-09] Replace [Set.subset t1 t2] with [Set.is_subset t1 ~of_:t2]
val fold_until : ('a, _) T.t -> init:'b -> f:('b -> 'a Elt.t -> ('b, 'stop) Continue_or_stop.t) -> ('b, 'stop) Finished_or_stopped_early.t
val fold_right : ('a, _) T.t -> init:'b -> f:('a Elt.t -> 'b -> 'b) -> 'b
val iter2 : ('a, 'cmp, ('a, 'cmp) T.t -> ('a, 'cmp) T.t -> f: ([ `Left of 'a Elt.t | `Right of 'a Elt.t | `Both of 'a Elt.t * 'a Elt.t ] -> unit) -> unit) Options.t
val filter : ('a, 'cmp, ('a, 'cmp) T.t -> f:('a Elt.t -> bool) -> ('a, 'cmp) T.t) Options.t
val partition_tf : ('a, 'cmp, ('a, 'cmp) T.t -> f:('a Elt.t -> bool) -> ('a, 'cmp) T.t * ('a, 'cmp) T.t) Options.t
val elements : ('a, _) T.t -> 'a Elt.t list
val min_elt : ('a, _) T.t -> 'a Elt.t option
val min_elt_exn : ('a, _) T.t -> 'a Elt.t
val max_elt : ('a, _) T.t -> 'a Elt.t option
val max_elt_exn : ('a, _) T.t -> 'a Elt.t
val choose : ('a, _) T.t -> 'a Elt.t option
val choose_exn : ('a, _) T.t -> 'a Elt.t
val split : ('a, 'cmp, ('a, 'cmp) T.t -> 'a Elt.t -> ('a, 'cmp) T.t * 'a Elt.t option * ('a, 'cmp) T.t) Options.t
val group_by : ('a, 'cmp, ('a, 'cmp) T.t -> equiv:('a Elt.t -> 'a Elt.t -> bool) -> ('a, 'cmp) T.t list) Options.t
val find_exn : ('a, _) T.t -> f:('a Elt.t -> bool) -> 'a Elt.t
val find_index : ('a, _) T.t -> int -> 'a Elt.t option
  • deprecated [since 2016-10] Use [nth]
val nth : ('a, _) T.t -> int -> 'a Elt.t option
val remove_index : ('a, 'cmp, ('a, 'cmp) T.t -> int -> ('a, 'cmp) T.t) Options.t
val to_tree : ('a, 'cmp) T.t -> ('a Elt.t, 'cmp) Tree.t
val to_sequence : ('a, 'cmp, ?order:[ `Increasing | `Decreasing ] -> ?greater_or_equal_to:'a Elt.t -> ?less_or_equal_to:'a Elt.t -> ('a, 'cmp) T.t -> 'a Elt.t Sequence.t) Options.t
val merge_to_sequence : ('a, 'cmp, ?order:[ `Increasing | `Decreasing ] -> ?greater_or_equal_to:'a Elt.t -> ?less_or_equal_to:'a Elt.t -> ('a, 'cmp) T.t -> ('a, 'cmp) T.t -> ('a Elt.t, 'a Elt.t) Merge_to_sequence_element.t Sequence.t) Options.t
OCaml

Innovation. Community. Security.