diff options
author | John Whitington <john@coherentgraphics.co.uk> | 2020-07-31 14:24:50 +0100 |
---|---|---|
committer | John Whitington <john@coherentgraphics.co.uk> | 2020-07-31 14:24:50 +0100 |
commit | a5ed794b4c8290a5d1567a9f861f7c69dc5d12fa (patch) | |
tree | e4d463af8d147620e303a88d5fef23e92c17d69f /stdlib/hashtbl.mli | |
parent | 4c5879b0795ecd9c609c111f5b37163ae4af2f9e (diff) | |
download | ocaml-a5ed794b4c8290a5d1567a9f861f7c69dc5d12fa.tar.gz |
Check-typo and indenting all done
Diffstat (limited to 'stdlib/hashtbl.mli')
-rw-r--r-- | stdlib/hashtbl.mli | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/stdlib/hashtbl.mli b/stdlib/hashtbl.mli index e6f08bace7..00df561bed 100644 --- a/stdlib/hashtbl.mli +++ b/stdlib/hashtbl.mli @@ -50,13 +50,13 @@ val create : ?random: (* thwart tools/unlabel *) bool -> int -> ('a, 'b) t A hash table that is created with [random] set to [true] uses the seeded hash function {!seeded_hash} with a seed that is randomly chosen at hash - table creation time. In effect, the hash function used is randomly selected - among [2^{30}] different hash functions. All these hash functions have - different collision patterns, rendering ineffective the denial-of-service - attack described above. However, because of randomization, enumerating all - elements of the hash table using {!fold} or {!iter} is no longer - deterministic: elements are enumerated in different orders at different runs - of the program. + table creation time. In effect, the hash function used is randomly + selected among [2^{30}] different hash functions. All these hash + functions have different collision patterns, rendering ineffective the + denial-of-service attack described above. However, because of + randomization, enumerating all elements of the hash table using {!fold} + or {!iter} is no longer deterministic: elements are enumerated in + different orders at different runs of the program. If no [random] parameter is given, hash tables are created in non-random mode by default. This default can be changed @@ -136,7 +136,8 @@ val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit by [f] during the iteration. *) -val filter_map_inplace: ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit +val filter_map_inplace: ('a -> 'b -> 'b option) -> ('a, 'b) t -> + unit (** [Hashtbl.filter_map_inplace f tbl] applies [f] to all bindings in table [tbl] and update each binding depending on the result of [f]. If [f] returns [None], the binding is discarded. If it @@ -346,7 +347,8 @@ module type S = val replace : 'a t -> key -> 'a -> unit val mem : 'a t -> key -> bool val iter : (key -> 'a -> unit) -> 'a t -> unit - val filter_map_inplace: (key -> 'a -> 'a option) -> 'a t -> unit + val filter_map_inplace: (key -> 'a -> 'a option) -> 'a t -> + unit (** @since 4.03.0 *) val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b @@ -420,7 +422,8 @@ module type SeededS = val replace : 'a t -> key -> 'a -> unit val mem : 'a t -> key -> bool val iter : (key -> 'a -> unit) -> 'a t -> unit - val filter_map_inplace: (key -> 'a -> 'a option) -> 'a t -> unit + val filter_map_inplace: (key -> 'a -> 'a option) -> 'a t -> + unit (** @since 4.03.0 *) val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b |