package lsp

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module String.MapSource

include Map.S with type key = t
Sourcetype key = t
Sourceand +'a t
Sourceval empty : 'a t
Sourceval is_empty : 'a t -> bool
Sourceval mem : 'a t -> key -> bool
Sourceval set : 'a t -> key -> 'a -> 'a t
Sourceval add : 'a t -> key -> 'a -> ('a t, 'a) Result.t
Sourceval add_exn : 'a t -> key -> 'a -> 'a t
Sourceval update : 'a t -> key -> f:('a option -> 'a option) -> 'a t
Sourceval singleton : key -> 'a -> 'a t
Sourceval remove : 'a t -> key -> 'a t
Sourceval add_multi : 'a list t -> key -> 'a -> 'a list t
Sourceval merge : 'a t -> 'b t -> f:(key -> 'a option -> 'b option -> 'c option) -> 'c t
Sourceval union : 'a t -> 'a t -> f:(key -> 'a -> 'a -> 'a option) -> 'a t
Sourceval superpose : 'a t -> 'a t -> 'a t

superpose a b is b augmented with bindings of a that are not in b.

Sourceval compare : 'a t -> 'a t -> compare:('a -> 'a -> Ordering.t) -> Ordering.t
Sourceval equal : 'a t -> 'a t -> equal:('a -> 'a -> bool) -> bool
Sourceval iter : 'a t -> f:('a -> unit) -> unit
Sourceval iteri : 'a t -> f:(key -> 'a -> unit) -> unit
Sourceval fold : 'a t -> init:'b -> f:('a -> 'b -> 'b) -> 'b
Sourceval foldi : 'a t -> init:'b -> f:(key -> 'a -> 'b -> 'b) -> 'b
Sourceval for_all : 'a t -> f:('a -> bool) -> bool
Sourceval for_alli : 'a t -> f:(key -> 'a -> bool) -> bool
Sourceval exists : 'a t -> f:('a -> bool) -> bool
Sourceval existsi : 'a t -> f:(key -> 'a -> bool) -> bool
Sourceval filter : 'a t -> f:('a -> bool) -> 'a t
Sourceval filteri : 'a t -> f:(key -> 'a -> bool) -> 'a t
Sourceval partition : 'a t -> f:('a -> bool) -> 'a t * 'a t
Sourceval partitioni : 'a t -> f:(key -> 'a -> bool) -> 'a t * 'a t
Sourceval cardinal : 'a t -> int
Sourceval to_list : 'a t -> (key * 'a) list
Sourceval of_list : (key * 'a) list -> ('a t, key * 'a * 'a) Result.t
Sourceval of_list_map : 'a list -> f:('a -> key * 'b) -> ('b t, key * 'a * 'a) Result.t
Sourceval of_list_map_exn : 'a list -> f:('a -> key * 'b) -> 'b t
Sourceval of_list_exn : (key * 'a) list -> 'a t
Sourceval of_list_multi : (key * 'a) list -> 'a list t
Sourceval of_list_reduce : (key * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
Sourceval of_list_reducei : (key * 'a) list -> f:(key -> 'a -> 'a -> 'a) -> 'a t
Sourceval of_list_fold : (key * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t

Return a map of (k, v) bindings such that:

 v = f init @@ f v1 @@ fv2 @@ ... @@ f vn 

where v1, v2, ... vn are the values associated to k in the input list, in the order in which they appear. This is essentially a more efficient version of:

 of_list_multi l |> map ~f:(List.fold_left ~init ~f) 
Sourceval keys : 'a t -> key list
Sourceval values : 'a t -> 'a list
Sourceval min_binding : 'a t -> (key * 'a) option
Sourceval max_binding : 'a t -> (key * 'a) option
Sourceval choose : 'a t -> (key * 'a) option
Sourceval split : 'a t -> key -> 'a t * 'a option * 'a t
Sourceval find : 'a t -> key -> 'a option
Sourceval find_exn : 'a t -> key -> 'a
Sourceval find_key : 'a t -> f:(key -> bool) -> key option
Sourceval map : 'a t -> f:('a -> 'b) -> 'b t
Sourceval mapi : 'a t -> f:(key -> 'a -> 'b) -> 'b t
Sourceval filter_map : 'a t -> f:('a -> 'b option) -> 'b t
Sourceval filter_mapi : 'a t -> f:(key -> 'a -> 'b option) -> 'b t
Sourceval is_subset : 'a t -> of_:'b t -> f:('a -> of_:'b -> bool) -> bool

is_subset t ~of_ ~f is true iff all keys in t are in of_ and f is true for all keys that are in both.

Sourcemodule Multi : sig ... end
Sourceval pp : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unit
Sourceval to_dyn : ('a -> Dyn.t) -> 'a t -> Dyn.t
OCaml

Innovation. Community. Security.