diff options
author | Pierre Weis <Pierre.Weis@inria.fr> | 1996-06-28 15:10:28 +0000 |
---|---|---|
committer | Pierre Weis <Pierre.Weis@inria.fr> | 1996-06-28 15:10:28 +0000 |
commit | e844057f4c00725fcd00f080b6e1008fe06491a4 (patch) | |
tree | cce02010f4dea367fead14e2d0d9627a218f6943 | |
parent | 9902130033c0fb168da35b558772496e61b5ff69 (diff) |
val --> value :)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@910 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | stdlib/hashtbl.mli | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stdlib/hashtbl.mli b/stdlib/hashtbl.mli index 2d7199921..999886ad0 100644 --- a/stdlib/hashtbl.mli +++ b/stdlib/hashtbl.mli @@ -52,7 +52,7 @@ val remove : ('a, 'b) t -> 'a -> unit val iter : ('a -> 'b -> 'c) -> ('a, 'b) t -> unit (* [Hashtbl.iter f tbl] applies [f] to all bindings in table [tbl], discarding all the results. - [f] receives the key as first argument, and the associated val + [f] receives the key as first argument, and the associated value as second argument. The order in which the bindings are passed to [f] is unpredictable. Each binding is presented exactly once to [f]. *) @@ -60,22 +60,22 @@ val iter : ('a -> 'b -> 'c) -> ('a, 'b) t -> unit (*** The polymorphic hash primitive *) val hash : 'a -> int - (* [Hashtbl.hash x] associates a positive integer to any val of + (* [Hashtbl.hash x] associates a positive integer to any value of any type. It is guaranteed that if [x = y], then [hash x = hash y]. Moreover, [hash] always terminates, even on cyclic structures. *) external hash_param : int -> int -> 'a -> int = "hash_univ_param" "noalloc" - (* [Hashtbl.hash_param n m x] computes a hash val for [x], with the + (* [Hashtbl.hash_param n m x] computes a hash value for [x], with the same properties as for [hash]. The two extra parameters [n] and [m] give more precise control over hashing. Hashing performs a depth-first, right-to-left traversal of the structure [x], stopping after [n] meaningful nodes were encountered, or [m] nodes, meaningful or not, were encountered. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant - constructors. Larger vals of [m] and [n] means that more + constructors. Larger values of [m] and [n] means that more nodes are taken into account to compute the final hash - val, and therefore collisions are less likely to happen. + value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters [m] and [n] govern the tradeoff between accuracy and speed. *) |