package mopsa

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

Maps with polymorphic keys and values

type ('k, 'a) map =
  1. | Empty
  2. | Node of ('k, 'a) map * 'k * 'a * ('k, 'a) map * int
type 'k compare = 'k -> 'k -> int
type ('k, 'a) t = {
  1. map : ('k, 'a) map;
  2. compare : 'k compare;
}

Internal functions with compare parameter

*********************************************

val height_ : ('a, 'b) map -> int
val create_ : ('a, 'b) map -> 'a -> 'b -> ('a, 'b) map -> ('a, 'b) map
val singleton_ : 'a -> 'b -> ('a, 'b) map
val bal_ : ('a, 'b) map -> 'a -> 'b -> ('a, 'b) map -> ('a, 'b) map
val empty_ : ('a, 'b) map
val is_empty_ : ('a, 'b) map -> bool
val add_ : ('a -> 'a -> int) -> 'a -> 'b -> ('a, 'b) map -> ('a, 'b) map
val find_ : ('a -> 'b -> int) -> 'a -> ('b, 'c) map -> 'c
val find_opt_ : ('a -> 'b -> int) -> 'a -> ('b, 'c) map -> 'c option
val mem_ : ('a -> 'b -> int) -> 'a -> ('b, 'c) map -> bool
val min_binding_ : ('a, 'b) map -> 'a * 'b
val max_binding_ : ('a, 'b) map -> 'a * 'b
val remove_min_binding_ : ('a, 'b) map -> ('a, 'b) map
val remove_ : ('a -> 'b -> int) -> 'a -> ('b, 'c) map -> ('b, 'c) map
val map_ : ('a -> 'b) -> ('c, 'a) map -> ('c, 'b) map
val mapi_ : ('a -> 'b -> 'c) -> ('a, 'b) map -> ('a, 'c) map
val fold_ : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) map -> 'c -> 'c
val for_all_ : ('a -> 'b -> bool) -> ('a, 'b) map -> bool
val exists_ : ('a -> 'b -> bool) -> ('a, 'b) map -> bool
val filter_ : ('a -> 'a -> int) -> ('a -> 'b -> bool) -> ('a, 'b) map -> ('a, 'b) map
val partition_ : ('a -> 'a -> int) -> ('a -> 'b -> bool) -> ('a, 'b) map -> ('a, 'b) map * ('a, 'b) map
val join_ : ('a -> 'a -> int) -> ('a, 'b) map -> 'a -> 'b -> ('a, 'b) map -> ('a, 'b) map
val concat_ : ('a -> 'a -> int) -> ('a, 'b) map -> ('a, 'b) map -> ('a, 'b) map
val concat_or_join_ : ('a -> 'a -> int) -> ('a, 'b) map -> 'a -> 'b option -> ('a, 'b) map -> ('a, 'b) map
val of_list_ : ('a -> 'a -> int) -> ('a * 'b) list -> ('a, 'b) map
val cut_ : ('a -> 'b -> int) -> 'a -> ('b, 'c) map -> ('b, 'c) map * 'c option * ('b, 'c) map
val for_all2zo_ : ('a -> 'a -> int) -> ('a -> 'b -> bool) -> ('a -> 'b -> bool) -> ('a -> 'b -> 'b -> bool) -> ('a, 'b) map -> ('a, 'b) map -> bool
val map2zo_ : ('a -> 'a -> int) -> ('a -> 'b -> 'b) -> ('a -> 'b -> 'b) -> ('a -> 'b -> 'b -> 'b) -> ('a, 'b) map -> ('a, 'b) map -> ('a, 'b) map
val split_ : ('a -> 'a -> int) -> 'a -> ('a, 'b) map -> ('a, 'b) map * 'b option * ('a, 'b) map
val merge_ : ('a -> 'a -> int) -> ('a -> 'b option -> 'c option -> 'd option) -> ('a, 'b) map -> ('a, 'c) map -> ('a, 'd) map
val bindings_aux_ : ('a * 'b) list -> ('a, 'b) map -> ('a * 'b) list
val bindings_ : ('a, 'b) map -> ('a * 'b) list
val cardinal_ : ('a, 'b) map -> int
val fold2zo_ : ('a -> 'a -> int) -> ('a -> 'b -> 'c -> 'c) -> ('a -> 'b -> 'c -> 'c) -> ('a -> 'b -> 'b -> 'c -> 'c) -> ('a, 'b) map -> ('a, 'b) map -> 'c -> 'c
val fold2o_ : ('a -> 'b -> int) -> ('a -> 'c -> 'd -> 'd) -> ('b -> 'e -> 'd -> 'd) -> ('a -> 'c -> 'e -> 'd -> 'd) -> ('a, 'c) map -> ('b, 'e) map -> 'd -> 'd
val iter_ : ('a -> 'b -> 'c) -> ('a, 'b) map -> unit
val iter2zo_ : ('a -> 'a -> int) -> ('a -> 'b -> unit) -> ('a -> 'b -> 'c) -> ('a -> 'b -> 'b -> unit) -> ('a, 'b) map -> ('a, 'b) map -> unit
val compare_ : ('a -> 'a -> int) -> ('b -> 'b -> int) -> ('a, 'b) map -> ('a, 'b) map -> int

Exported functions

**********************

val singleton : compare:'a compare -> 'a -> 'b -> ('a, 'b) t
val empty : compare:'a compare -> ('a, 'b) t
val is_empty : ('a, 'b) t -> bool
val add : 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t
val find : 'a -> ('a, 'b) t -> 'b
val find_opt : 'a -> ('a, 'b) t -> 'b option
val mem : 'a -> ('a, 'b) t -> bool
val min_binding : ('a, 'b) t -> 'a * 'b
val remove_min_binding : ('a, 'b) t -> ('a, 'b) t
val remove : 'a -> ('a, 'b) t -> ('a, 'b) t
val max_binding : ('a, 'b) t -> 'a * 'b
val iter : ('a -> 'b -> 'c) -> ('a, 'b) t -> unit
val map : ('a -> 'b) -> ('c, 'a) t -> ('c, 'b) t
val mapi : ('a -> 'b -> 'c) -> ('a, 'b) t -> ('a, 'c) t
val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c
val for_all : ('a -> 'b -> bool) -> ('a, 'b) t -> bool
val exists : ('a -> 'b -> bool) -> ('a, 'b) t -> bool
val filter : ('a -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t
val partition : ('a -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t * ('a, 'b) t
val for_all2zo : ('a -> 'b -> bool) -> ('a -> 'b -> bool) -> ('a -> 'b -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t -> bool
val map2zo : ('a -> 'b -> 'b) -> ('a -> 'b -> 'b) -> ('a -> 'b -> 'b -> 'b) -> ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
val merge : ('a -> 'b option -> 'c option -> 'd option) -> ('a, 'b) t -> ('a, 'c) t -> ('a, 'd) t
val bindings : ('a, 'b) t -> ('a * 'b) list
val cardinal : ('a, 'b) t -> int
val fold2zo : ('a -> 'b -> 'c -> 'c) -> ('a -> 'b -> 'c -> 'c) -> ('a -> 'b -> 'b -> 'c -> 'c) -> ('a, 'b) t -> ('a, 'b) t -> 'c -> 'c
val fold2o : ('a -> 'b -> 'c -> 'c) -> ('a -> 'd -> 'c -> 'c) -> ('a -> 'b -> 'd -> 'c -> 'c) -> ('a, 'b) t -> ('a, 'd) t -> 'c -> 'c
val compare : ('a -> 'a -> int) -> ('b, 'a) t -> ('b, 'a) t -> int
val of_list : 'a compare -> ('a * 'b) list -> ('a, 'b) t
OCaml

Innovation. Community. Security.