let replace t k v = ensure_can_modify t; match Hashtbl.find t.table k with | None -> `No_such_key | Some elt -> (Elt.value elt).value <- v; `Ok