Browse thread
make[1]: warning: Clock skew detected. Your build may be incomplete.
-
Mattias Waldau
- skaller
-
Igor Peshansky
-
Mattias Waldau
-
Diego Olivier Fernandez Pons
-
Jacques Garrigue
- Diego Olivier Fernandez Pons
-
Jacques Garrigue
- Jacques Garrigue
-
Diego Olivier Fernandez Pons
-
Mattias Waldau
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-09-07 (10:32) |
From: | Diego Olivier Fernandez Pons <Diego.FERNANDEZ_PONS@e...> |
Subject: | Re: [Caml-list] Equality/Hashtable for functions (inline help feature) |
Bonjour, > Note that you cannot use hashtables, as the default hash function will > fail on functions, but you can use an association list with physical > equality. I dont understand why the hash function fails on functions. When I call Hashtbl.hash : 'a -> int with a function I get an integer. Does it mean the integer could change while the program is running ? # Hashtbl.hash (fun x -> x + 1);; - : int = 151020553 # Hashtbl.hash (fun x -> x + 2);; - : int = 151020609 # Hashtbl.hash (fun x y -> x + y);; - : int = 151020669 I had in mind a reduction of the search space based on the hash value and an association list with physical equallity test on the functions that have the same hash (collisions). Diego Olivier