let replace t ~key ~data = match Hashtbl.find t.tbl key with | None -> push_exn t ~key ~data | Some el -> Heap.update el (key, data)