let union cup m1 m2 = M.fold (fun x e m -> let e = try cup e (M.find x m2) with Not_found -> e in M.add x e m ) m1 m2