Module ExtHashtbl.Hashtbl


module Hashtbl: sig  end

type ('a, 'b) t 
The type of a hashtable.


New Functions


val exists : ('a, 'b) t -> 'a -> bool
exists h k returns true is at least one item with key k is found in the hashtable.
val keys : ('a, 'b) t -> 'a Enum.t
returns an enumeration of all the keys of an hashtable. If the key is in the Hashtable multiple times, all occuransces will be returned
val values : ('a, 'b) t -> 'b Enum.t
returns an enumeration of all the values of an hashtable.
val enum : ('a, 'b) t -> ('a * 'b) Enum.t
returns an enumeration of (key,value) pairs of an hashtable.
val of_enum : ('a * 'b) Enum.t -> ('a, 'b) t
create an hashtable from a (key,value) enumeration.
val find_default : ('a, 'b) t -> 'a -> 'b -> 'b
find a binding for the key, and return a default value if not found
val remove_all : ('a, 'b) t -> 'a -> unit
remove all bindings for the given key
val map : ('a -> 'b) -> ('c, 'a) t -> ('c, 'b) t
map f x creates a new hashtable with the same keys as x, but with the function f applied to all the values


Older Functions



Please refer to the Ocaml Manual for documentation of theses functions. (note : functor support removed to avoid code duplication).

val create : int -> ('a, 'b) t
val clear : ('a, 'b) t -> unit
val add : ('a, 'b) t -> 'a -> 'b -> unit
val copy : ('a, 'b) t -> ('a, 'b) t
val find : ('a, 'b) t -> 'a -> 'b
val find_all : ('a, 'b) t -> 'a -> 'b list
val mem : ('a, 'b) t -> 'a -> bool
val remove : ('a, 'b) t -> 'a -> unit
val replace : ('a, 'b) t -> 'a -> 'b -> unit
val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit
val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c
val hash : 'a -> int
val hash_param : int -> int -> 'a -> int