let insert_opt dm (k_opt,v) = match k_opt with | None -> set_default dm (Some v) | Some k -> insert dm (k, v)