functor HASHDICT( structure D:DictSig val hash: D.Key -> int val size:int) = struct local open Array in type Dict = D.Dict array val Lookup = D.Lookup fun empty () = array(size, D.empty) fun lookup d k = D.lookup (d sub (hash k)) k fun enter((k,e),d) = let val h = hash k in update(d, h, D.enter((k, e), d sub h)) end fun remove(k,d) = let val h = hash k in update(d, h, D.remove(k, d sub h)) end end end;