Associative patching in OCaml