From b2d8dcd8673cfcdbf1e8a02aa19c53e42b8a60b6 Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Mon, 19 May 2025 21:17:49 +0200 Subject: Transition from exception-based errors to printf-based --- hashtable.sml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hashtable.sml') 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 -- cgit v1.2.3