let
remove (m, s, d_opt) k = (
M
.remove k m,
S
.add k s, d_opt)