package base

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type ('a, 'b, 'c) t
type ('a, 'b, 'c) tree
type 'a key
type 'a cmp
type ('a, 'b, 'c) create_options
type ('a, 'b, 'c) access_options
val empty : ('k, 'cmp, ('k, _, 'cmp) t) create_options
val singleton : ('k, 'cmp, 'k key -> 'v -> ('k, 'v, 'cmp) t) create_options
val map_keys : ('k2, 'cmp2, ('k1, 'v, 'cmp1) t -> f:('k1 key -> 'k2 key) -> [ `Ok of ('k2, 'v, 'cmp2) t | `Duplicate_key of 'k2 key ]) create_options
val map_keys_exn : ('k2, 'cmp2, ('k1, 'v, 'cmp1) t -> f:('k1 key -> 'k2 key) -> ('k2, 'v, 'cmp2) t) create_options
val transpose_keys : ('k1, 'cmp1, ('k2, 'cmp2, ('k1, ('k2, 'a, 'cmp2) t, 'cmp1) t -> ('k2, ('k1, 'a, 'cmp1) t, 'cmp2) t) create_options) access_options
val of_sorted_array : ('k, 'cmp, ('k key * 'v) array -> ('k, 'v, 'cmp) t Or_error.t) create_options
val of_sorted_array_unchecked : ('k, 'cmp, ('k key * 'v) array -> ('k, 'v, 'cmp) t) create_options
val of_increasing_iterator_unchecked : ('k, 'cmp, len:int -> f:(int -> 'k key * 'v) -> ('k, 'v, 'cmp) t) create_options
val of_alist : ('k, 'cmp, ('k key * 'v) list -> [ `Ok of ('k, 'v, 'cmp) t | `Duplicate_key of 'k key ]) create_options
val of_alist_or_error : ('k, 'cmp, ('k key * 'v) list -> ('k, 'v, 'cmp) t Or_error.t) create_options
val of_alist_exn : ('k, 'cmp, ('k key * 'v) list -> ('k, 'v, 'cmp) t) create_options
val of_alist_multi : ('k, 'cmp, ('k key * 'v) list -> ('k, 'v list, 'cmp) t) create_options
val of_alist_fold : ('k, 'cmp, ('k key * 'v1) list -> init:'v2 -> f:('v2 -> 'v1 -> 'v2) -> ('k, 'v2, 'cmp) t) create_options
val of_alist_reduce : ('k, 'cmp, ('k key * 'v) list -> f:('v -> 'v -> 'v) -> ('k, 'v, 'cmp) t) create_options
val of_increasing_sequence : ('k, 'cmp, ('k key * 'v) Sequence.t -> ('k, 'v, 'cmp) t Or_error.t) create_options
val of_sequence : ('k, 'cmp, ('k key * 'v) Sequence.t -> [ `Ok of ('k, 'v, 'cmp) t | `Duplicate_key of 'k key ]) create_options
val of_sequence_or_error : ('k, 'cmp, ('k key * 'v) Sequence.t -> ('k, 'v, 'cmp) t Or_error.t) create_options
val of_sequence_exn : ('k, 'cmp, ('k key * 'v) Sequence.t -> ('k, 'v, 'cmp) t) create_options
val of_sequence_multi : ('k, 'cmp, ('k key * 'v) Sequence.t -> ('k, 'v list, 'cmp) t) create_options
val of_sequence_fold : ('k, 'cmp, ('k key * 'v1) Sequence.t -> init:'v2 -> f:('v2 -> 'v1 -> 'v2) -> ('k, 'v2, 'cmp) t) create_options
val of_sequence_reduce : ('k, 'cmp, ('k key * 'v) Sequence.t -> f:('v -> 'v -> 'v) -> ('k, 'v, 'cmp) t) create_options
val of_list_with_key : ('k, 'cmp, 'v list -> get_key:('v -> 'k key) -> [ `Ok of ('k, 'v, 'cmp) t | `Duplicate_key of 'k key ]) create_options
val of_list_with_key_or_error : ('k, 'cmp, 'v list -> get_key:('v -> 'k key) -> ('k, 'v, 'cmp) t Or_error.t) create_options
val of_list_with_key_exn : ('k, 'cmp, 'v list -> get_key:('v -> 'k key) -> ('k, 'v, 'cmp) t) create_options
val of_list_with_key_multi : ('k, 'cmp, 'v list -> get_key:('v -> 'k key) -> ('k, 'v list, 'cmp) t) create_options
val of_iteri : ('k, 'cmp, iteri:(f:(key:'k key -> data:'v -> unit) -> unit) -> [ `Ok of ('k, 'v, 'cmp) t | `Duplicate_key of 'k key ]) create_options
val of_iteri_exn : ('k, 'cmp, iteri:(f:(key:'k key -> data:'v -> unit) -> unit) -> ('k, 'v, 'cmp) t) create_options
val of_tree : ('k, 'cmp, ('k key, 'v, 'cmp) tree -> ('k, 'v, 'cmp) t) create_options
val invariants : ('k, 'cmp, ('k, 'v, 'cmp) t -> bool) access_options
val is_empty : (_, _, _) t -> bool
val length : (_, _, _) t -> int
val add : ('k, 'cmp, ('k, 'v, 'cmp) t -> key:'k key -> data:'v -> [ `Ok of ('k, 'v, 'cmp) t | `Duplicate ]) access_options
val add_exn : ('k, 'cmp, ('k, 'v, 'cmp) t -> key:'k key -> data:'v -> ('k, 'v, 'cmp) t) access_options
val set : ('k, 'cmp, ('k, 'v, 'cmp) t -> key:'k key -> data:'v -> ('k, 'v, 'cmp) t) access_options
val add_multi : ('k, 'cmp, ('k, 'v list, 'cmp) t -> key:'k key -> data:'v -> ('k, 'v list, 'cmp) t) access_options
val remove_multi : ('k, 'cmp, ('k, 'v list, 'cmp) t -> 'k key -> ('k, 'v list, 'cmp) t) access_options
val find_multi : ('k, 'cmp, ('k, 'v list, 'cmp) t -> 'k key -> 'v list) access_options
val change : ('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> f:('v option -> 'v option) -> ('k, 'v, 'cmp) t) access_options
val update : ('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> f:('v option -> 'v) -> ('k, 'v, 'cmp) t) access_options
val find : ('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> 'v option) access_options
val find_exn : ('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> 'v) access_options
val remove : ('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> ('k, 'v, 'cmp) t) access_options
val mem : ('k, 'cmp, ('k, _, 'cmp) t -> 'k key -> bool) access_options
val iter_keys : ('k, _, _) t -> f:('k key -> unit) -> unit
val iter : (_, 'v, _) t -> f:('v -> unit) -> unit
val iteri : ('k, 'v, _) t -> f:(key:'k key -> data:'v -> unit) -> unit
val iteri_until : ('k, 'v, _) t -> f:(key:'k key -> data:'v -> Continue_or_stop.t) -> Finished_or_unfinished.t
val iter2 : ('k, 'cmp, ('k, 'v1, 'cmp) t -> ('k, 'v2, 'cmp) t -> f: (key:'k key -> data:[ `Left of 'v1 | `Right of 'v2 | `Both of 'v1 * 'v2 ] -> unit) -> unit) access_options
val map : ('k, 'v1, 'cmp) t -> f:('v1 -> 'v2) -> ('k, 'v2, 'cmp) t
val mapi : ('k, 'v1, 'cmp) t -> f:(key:'k key -> data:'v1 -> 'v2) -> ('k, 'v2, 'cmp) t
val fold : ('k, 'v, _) t -> init:'acc -> f:(key:'k key -> data:'v -> 'acc -> 'acc) -> 'acc
val fold_until : ('k, 'v, _) t -> init:'acc -> f: (key:'k key -> data:'v -> 'acc -> ('acc, 'final) Container.Continue_or_stop.t) -> finish:('acc -> 'final) -> 'final
val fold_right : ('k, 'v, _) t -> init:'acc -> f:(key:'k key -> data:'v -> 'acc -> 'acc) -> 'acc
val fold2 : ('k, 'cmp, ('k, 'v1, 'cmp) t -> ('k, 'v2, 'cmp) t -> init:'acc -> f: (key:'k key -> data:[ `Left of 'v1 | `Right of 'v2 | `Both of 'v1 * 'v2 ] -> 'acc -> 'acc) -> 'acc) access_options
val filter_keys : ('k, 'v, 'cmp) t -> f:('k key -> bool) -> ('k, 'v, 'cmp) t
val filter : ('k, 'v, 'cmp) t -> f:('v -> bool) -> ('k, 'v, 'cmp) t
val filteri : ('k, 'v, 'cmp) t -> f:(key:'k key -> data:'v -> bool) -> ('k, 'v, 'cmp) t
val filter_map : ('k, 'v1, 'cmp) t -> f:('v1 -> 'v2 option) -> ('k, 'v2, 'cmp) t
val filter_mapi : ('k, 'v1, 'cmp) t -> f:(key:'k key -> data:'v1 -> 'v2 option) -> ('k, 'v2, 'cmp) t
val partition_mapi : ('k, 'v1, 'cmp) t -> f:(key:'k key -> data:'v1 -> ('v2, 'v3) Either.t) -> ('k, 'v2, 'cmp) t * ('k, 'v3, 'cmp) t
val partition_map : ('k, 'v1, 'cmp) t -> f:('v1 -> ('v2, 'v3) Either.t) -> ('k, 'v2, 'cmp) t * ('k, 'v3, 'cmp) t
val partitioni_tf : ('k, 'v, 'cmp) t -> f:(key:'k key -> data:'v -> bool) -> ('k, 'v, 'cmp) t * ('k, 'v, 'cmp) t
val partition_tf : ('k, 'v, 'cmp) t -> f:('v -> bool) -> ('k, 'v, 'cmp) t * ('k, 'v, 'cmp) t
val combine_errors : ('k, 'cmp, ('k, 'v Or_error.t, 'cmp) t -> ('k, 'v, 'cmp) t Or_error.t) access_options
val compare_direct : ('k, 'cmp, ('v -> 'v -> int) -> ('k, 'v, 'cmp) t -> ('k, 'v, 'cmp) t -> int) access_options
val equal : ('k, 'cmp, ('v -> 'v -> bool) -> ('k, 'v, 'cmp) t -> ('k, 'v, 'cmp) t -> bool) access_options
val keys : ('k, _, _) t -> 'k key list
val data : (_, 'v, _) t -> 'v list
val to_alist : ?key_order:[ `Increasing | `Decreasing ] -> ('k, 'v, _) t -> ('k key * 'v) list
val merge : ('k, 'cmp, ('k, 'v1, 'cmp) t -> ('k, 'v2, 'cmp) t -> f: (key:'k key -> [ `Left of 'v1 | `Right of 'v2 | `Both of 'v1 * 'v2 ] -> 'v3 option) -> ('k, 'v3, 'cmp) t) access_options
val merge_skewed : ('k, 'cmp, ('k, 'v, 'cmp) t -> ('k, 'v, 'cmp) t -> combine:(key:'k key -> 'v -> 'v -> 'v) -> ('k, 'v, 'cmp) t) access_options
val symmetric_diff : ('k, 'cmp, ('k, 'v, 'cmp) t -> ('k, 'v, 'cmp) t -> data_equal:('v -> 'v -> bool) -> ('k key * [ `Left of 'v | `Right of 'v | `Unequal of 'v * 'v ]) Sequence.t) access_options
val fold_symmetric_diff : ('k, 'cmp, ('k, 'v, 'cmp) t -> ('k, 'v, 'cmp) t -> data_equal:('v -> 'v -> bool) -> init:'acc -> f: ('acc -> ('k key * [ `Left of 'v | `Right of 'v | `Unequal of 'v * 'v ]) -> 'acc) -> 'acc) access_options
val min_elt : ('k, 'v, _) t -> ('k key * 'v) option
val min_elt_exn : ('k, 'v, _) t -> 'k key * 'v
val max_elt : ('k, 'v, _) t -> ('k key * 'v) option
val max_elt_exn : ('k, 'v, _) t -> 'k key * 'v
val for_all : ('k, 'v, _) t -> f:('v -> bool) -> bool
val for_alli : ('k, 'v, _) t -> f:(key:'k key -> data:'v -> bool) -> bool
val exists : ('k, 'v, _) t -> f:('v -> bool) -> bool
val existsi : ('k, 'v, _) t -> f:(key:'k key -> data:'v -> bool) -> bool
val count : ('k, 'v, _) t -> f:('v -> bool) -> int
val counti : ('k, 'v, _) t -> f:(key:'k key -> data:'v -> bool) -> int
val split : ('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> ('k, 'v, 'cmp) t * ('k key * 'v) option * ('k, 'v, 'cmp) t) access_options
val split_le_gt : ('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> ('k, 'v, 'cmp) t * ('k, 'v, 'cmp) t) access_options
val split_lt_ge : ('k, 'cmp, ('k, 'v, 'cmp) t -> 'k key -> ('k, 'v, 'cmp) t * ('k, 'v, 'cmp) t) access_options
val append : ('k, 'cmp, lower_part:('k, 'v, 'cmp) t -> upper_part:('k, 'v, 'cmp) t -> [ `Ok of ('k, 'v, 'cmp) t | `Overlapping_key_ranges ]) access_options
val subrange : ('k, 'cmp, ('k, 'v, 'cmp) t -> lower_bound:'k key Maybe_bound.t -> upper_bound:'k key Maybe_bound.t -> ('k, 'v, 'cmp) t) access_options
val fold_range_inclusive : ('k, 'cmp, ('k, 'v, 'cmp) t -> min:'k key -> max:'k key -> init:'acc -> f:(key:'k key -> data:'v -> 'acc -> 'acc) -> 'acc) access_options
val range_to_alist : ('k, 'cmp, ('k, 'v, 'cmp) t -> min:'k key -> max:'k key -> ('k key * 'v) list) access_options
val closest_key : ('k, 'cmp, ('k, 'v, 'cmp) t -> [ `Greater_or_equal_to | `Greater_than | `Less_or_equal_to | `Less_than ] -> 'k key -> ('k key * 'v) option) access_options
val nth : ('k, 'v, 'cmp) t -> int -> ('k key * 'v) option
val nth_exn : ('k, 'v, 'cmp) t -> int -> 'k key * 'v
val rank : ('k, 'cmp, ('k, _, 'cmp) t -> 'k key -> int option) access_options
val to_tree : ('k, 'v, 'cmp) t -> ('k key, 'v, 'cmp) tree
val to_sequence : ('k, 'cmp, ?order:[ `Increasing_key | `Decreasing_key ] -> ?keys_greater_or_equal_to:'k key -> ?keys_less_or_equal_to:'k key -> ('k, 'v, 'cmp) t -> ('k key * 'v) Sequence.t) access_options
val binary_search_segmented : ('k, 'cmp, ('k, 'v, 'cmp) t -> segment_of:(key:'k key -> data:'v -> [ `Left | `Right ]) -> Binary_searchable.Which_target_by_segment.t -> ('k key * 'v) option) access_options
val binary_search_subrange : ('k, 'cmp, ('k, 'v, 'cmp) t -> compare:(key:'k key -> data:'v -> 'bound -> int) -> lower_bound:'bound Maybe_bound.t -> upper_bound:'bound Maybe_bound.t -> ('k, 'v, 'cmp) t) access_options
OCaml

Innovation. Community. Security.