let remove h key =
let rec remove_bucket = function
Empty ->
Empty
| Cons(k, i, next) ->
if compare k key = 0
then begin h.size <- pred h.size; next end
else Cons(k, i, remove_bucket next) in
let i = (hash key) mod (Array.length h.data) in
h.data.(i) <- remove_bucket h.data.(i)