diff options
Diffstat (limited to 'hashtable.sml')
-rw-r--r-- | hashtable.sml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hashtable.sml b/hashtable.sml index 6ec7277..822d1fd 100644 --- a/hashtable.sml +++ b/hashtable.sml @@ -39,12 +39,12 @@ structure Hashtable: HASHTABLE = struct fun next idx mask = (idx + `1) andb mask - fun lookup2 ((array, _, mask): 'a t) (key: string) f g = + fun lookup2 (array, _, mask) key f g = let fun find idx = case sub (array, !idx) of NONE => g () - | SOME (key', v: 'a) => + | SOME (key', v) => if key' = key then case f v of (NONE, res) => res |