Module Core_hashtbl_intf

module Core_hashtbl_intf: sig .. end
Values returned by hash must be non-negative. An exception will be raised in the case that hash returns a negative value.

val __pa_ounit_275876e34cf609db118f3d84b799a790 : string
module Binable: Binable0
module type Key = sig .. end
module type Key_binable = sig .. end
module Hashable: sig .. end
module type Hashable = sig .. end
module type Accessors = sig .. end
type ('key, 'z) create_options_without_hashable = ?growth_allowed:bool -> ?size:int -> 'z 
type ('key, 'z) create_options_with_hashable = ?growth_allowed:bool ->
?size:int -> hashable:'key Hashable.t -> 'z
module type Creators = sig .. end
module type S = sig .. end
module type S_binable = sig .. end
module type Hashtbl = sig .. end

Values returned by hash must be non-negative. An exception will be raised in the case that hash returns a negative value.

change t key f updates the given table by changing the value stored under key according to f, just like Map.change (see that for example).

add_multi t ~key ~data if key is present in the table then cons data on the list, otherwise add key with a single element list.

remove_multi t key updates the table, removing the head of the list bound to key. If the list has only one element (or is empty) then the binding is removed.

map t f returns new table with bound values replaced by f applied to the bound values

like map, but function takes both key and data as arguments

returns new map with bound values filtered by f applied to the bound values

like filter_map, but function takes both key and data as arguments

returns new maps with bound values partitioned by f applied to the bound values

like partition_map, but function takes both key and data as arguments

find_or_add t k ~default returns the data associated with key k if it is in the table t, otherwise it lets d = default() and adds it to the table.

find t k returns Some (the current binding) of k in t, or None if no such binding exists

find_exn t k returns the current binding of k in t, or raises Not_found if no such binding exists.

find_and_remove t k returns Some (the current binding) of k in t and removes it, or None is no such binding exists

iter_vals t ~f is like iter, except it only supplies the value to f, not the key.

Merge two hashtables.

The result of merge f h1 h2 has as keys the set of all k in the union of the sets of keys of h1 and h2 for which d(k) is not None, where:

d(k) =

Each key k is mapped to a single piece of data x, where d(k) = Some x.

Merge one hashtable into another.

After merge_into f src dst, for every key in src, key will be re-mapped in dst to v if f ~key d1 (find dst key) = Some v.

Returns the list of all keys for given hashtable.

Returns the list of all data for given hashtable.

filter_inplace t ~f removes all the elements from t that don't satisfy f.

Returns the list of all (key,data) pairs for given hashtable.