package base

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type ('a, 'cmp) t
include Container.Generic with type ('a, 'cmp, _) t := ('a, 'cmp) t
type 'a elt
val length : (_, _) t -> int
val is_empty : (_, _) t -> bool
val iter : ('a, _) t -> f:('a elt -> unit) -> unit
val fold : ('a, _) t -> init:'acc -> f:('acc -> 'a elt -> 'acc) -> 'acc
val fold_result : ('a, _) t -> init:'acc -> f:('acc -> 'a elt -> ('acc, 'e) Result.t) -> ('acc, 'e) Result.t
val exists : ('a, _) t -> f:('a elt -> bool) -> bool
val for_all : ('a, _) t -> f:('a elt -> bool) -> bool
val count : ('a, _) t -> f:('a elt -> bool) -> int
val sum : (module Container.Summable with type t = 'sum) -> ('a, _) t -> f:('a elt -> 'sum) -> 'sum
val find : ('a, _) t -> f:('a elt -> bool) -> 'a elt option
val find_map : ('a, _) t -> f:('a elt -> 'b option) -> 'b option
val to_list : ('a, _) t -> 'a elt list
val to_array : ('a, _) t -> 'a elt array
type ('a, 'cmp) tree
type ('a, 'cmp, 'z) access_options

The access_options type is used to make Accessors_generic flexible as to whether a comparator is required to be passed to certain functions.

type 'cmp cmp
val invariants : ('a, 'cmp, ('a, 'cmp) t -> bool) access_options
val mem : ('a, 'cmp, ('a, 'cmp) t -> 'a elt -> bool) access_options

override Container's mem

val add : ('a, 'cmp, ('a, 'cmp) t -> 'a elt -> ('a, 'cmp) t) access_options
val remove : ('a, 'cmp, ('a, 'cmp) t -> 'a elt -> ('a, 'cmp) t) access_options
val union : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) t) access_options
val inter : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) t) access_options
val diff : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) t) access_options
val symmetric_diff : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> ('a elt, 'a elt) Either.t Sequence.t) access_options
val compare_direct : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> int) access_options
val equal : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> bool) access_options
val is_subset : ('a, 'cmp, ('a, 'cmp) t -> of_:('a, 'cmp) t -> bool) access_options
val are_disjoint : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> bool) access_options
module Named : sig ... end
val fold_until : ('a, _) t -> init:'acc -> f:('acc -> 'a elt -> ('acc, 'final) Container.Continue_or_stop.t) -> finish:('acc -> 'final) -> 'final
val fold_right : ('a, _) t -> init:'acc -> f:('a elt -> 'acc -> 'acc) -> 'acc
val iter2 : ('a, 'cmp, ('a, 'cmp) t -> ('a, 'cmp) t -> f: ([ `Left of 'a elt | `Right of 'a elt | `Both of 'a elt * 'a elt ] -> unit) -> unit) access_options
val filter : ('a, 'cmp) t -> f:('a elt -> bool) -> ('a, 'cmp) t
val partition_tf : ('a, 'cmp) t -> f:('a elt -> bool) -> ('a, 'cmp) t * ('a, 'cmp) t
val elements : ('a, _) t -> 'a elt list
val min_elt : ('a, _) t -> 'a elt option
val min_elt_exn : ('a, _) t -> 'a elt
val max_elt : ('a, _) t -> 'a elt option
val max_elt_exn : ('a, _) t -> 'a elt
val choose : ('a, _) t -> 'a elt option
val choose_exn : ('a, _) t -> 'a elt
val split : ('a, 'cmp, ('a, 'cmp) t -> 'a elt -> ('a, 'cmp) t * 'a elt option * ('a, 'cmp) t) access_options
val split_le_gt : ('a, 'cmp, ('a, 'cmp) t -> 'a elt -> ('a, 'cmp) t * ('a, 'cmp) t) access_options
val split_lt_ge : ('a, 'cmp, ('a, 'cmp) t -> 'a elt -> ('a, 'cmp) t * ('a, 'cmp) t) access_options
val group_by : ('a, 'cmp) t -> equiv:('a elt -> 'a elt -> bool) -> ('a, 'cmp) t list
val find_exn : ('a, _) t -> f:('a elt -> bool) -> 'a elt
val nth : ('a, _) t -> int -> 'a elt option
val remove_index : ('a, 'cmp, ('a, 'cmp) t -> int -> ('a, 'cmp) t) access_options
val to_tree : ('a, 'cmp) t -> ('a, 'cmp) tree
val to_sequence : ('a, 'cmp, ?order:[ `Increasing | `Decreasing ] -> ?greater_or_equal_to:'a elt -> ?less_or_equal_to:'a elt -> ('a, 'cmp) t -> 'a elt Sequence.t) access_options
val binary_search_segmented : ('a, 'cmp, ('a, 'cmp) t -> segment_of:('a elt -> [ `Left | `Right ]) -> Binary_searchable.Which_target_by_segment.t -> 'a elt option) access_options
val merge_to_sequence : ('a, 'cmp, ?order:[ `Increasing | `Decreasing ] -> ?greater_or_equal_to:'a elt -> ?less_or_equal_to:'a elt -> ('a, 'cmp) t -> ('a, 'cmp) t -> ('a elt, 'a elt) Sequence.Merge_with_duplicates_element.t Sequence.t) access_options
OCaml

Innovation. Community. Security.