package hashcons

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

Module Hashcons.HmapSource

Sourcetype (+'a, !+'b) t
Sourcetype 'a key = 'a hash_consed
Sourceval empty : ('a, 'b) t
Sourceval is_empty : ('a, 'b) t -> bool
Sourceval singleton : 'a key -> 'b -> ('a, 'b) t
Sourceval add : 'a key -> 'b -> ('a, 'b) t -> ('a, 'b) t
Sourceval find : 'a key -> ('a, 'b) t -> 'b
Sourceval find_opt : 'a key -> ('a, 'b) t -> 'b option
Sourceval update : 'a key -> ('b option -> 'b option) -> ('a, 'b) t -> ('a, 'b) t
Sourceval cardinal : ('a, 'b) t -> int
Sourceval remove : 'a key -> ('a, 'b) t -> ('a, 'b) t
Sourceval mem : 'a key -> ('a, 'b) t -> bool
Sourceval add_seq : ('a key * 'b) Seq.t -> ('a, 'b) t -> ('a, 'b) t
Sourceval of_seq : ('a key * 'b) Seq.t -> ('a, 'b) t
Sourceval partition : ('a key -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t * ('a, 'b) t
Sourceval choose : ('a, 'b) t -> 'a key * 'b
Sourceval choose_opt : ('a, 'b) t -> ('a key * 'b) option
Sourceval split : 'a key -> ('a, 'b) t -> ('a, 'b) t * 'b option * ('a, 'b) t
Sourceval equal : ('b -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t -> bool
Sourceval compare : ('b -> 'b -> int) -> ('a, 'b) t -> ('a, 'b) t -> int
Sourceval merge : ('a key -> 'b option -> 'c option -> 'd option) -> ('a, 'b) t -> ('a, 'c) t -> ('a, 'd) t
Sourceval union : ('a key -> 'b -> 'b -> 'b option) -> ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
Sourceval iter : ('a key -> 'b -> unit) -> ('a, 'b) t -> unit
Sourceval map : ('b -> 'c) -> ('a, 'b) t -> ('a, 'c) t
Sourceval mapi : ('a key -> 'b -> 'c) -> ('a, 'b) t -> ('a, 'c) t
Sourceval fold : ('a key -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c
Sourceval exists : ('a key -> 'b -> bool) -> ('a, 'b) t -> bool
Sourceval for_all : ('a key -> 'b -> bool) -> ('a, 'b) t -> bool
Sourceval filter : ('a key -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t
Sourceval filter_map : ('a key -> 'b -> 'c option) -> ('a, 'b) t -> ('a, 'c) t
Sourceval bindings : ('a, 'b) t -> ('a key * 'b) list
Sourceval to_seq : ('a, 'b) t -> ('a key * 'b) Seq.t
Sourceval min_binding_opt : ('a, 'b) t -> ('a key * 'b) option
Sourceval max_binding_opt : ('a, 'b) t -> ('a key * 'b) option
Sourceval min_binding : ('a, 'b) t -> 'a key * 'b
Sourceval max_binding : ('a, 'b) t -> 'a key * 'b
Sourceval find_first_opt : ('a key -> bool) -> ('a, 'b) t -> ('a key * 'b) option
Sourceval find_last_opt : ('a key -> bool) -> ('a, 'b) t -> ('a key * 'b) option
Sourceval find_first : ('a key -> bool) -> ('a, 'b) t -> 'a key * 'b
Sourceval find_last : ('a key -> bool) -> ('a, 'b) t -> 'a key * 'b
Sourceval find_any : ('a key -> 'b -> bool) -> ('a, 'b) t -> 'a key * 'b
Sourceval find_any_opt : ('a key -> 'b -> bool) -> ('a, 'b) t -> ('a key * 'b) option
Sourceval is_singleton : ('a, 'b) t -> ('a key * 'b) option

if the map is a singleton, return the unique binding, else return None