small comment

This commit is contained in:
Simon Cruanes 2017-11-29 14:43:11 +01:00
parent 2fbf765466
commit f65bcd212d
2 changed files with 6 additions and 1 deletions

View file

@ -94,7 +94,9 @@ end
module Make(O : Map.OrderedType) = struct
module M = Map.Make(O)
(* overload [union] if it's not in [M] *)
(* backport functions from recent stdlib.
they will be shadowed by inclusion of [S] if present. *)
let union f a b =
M.merge
(fun k v1 v2 -> match v1, v2 with

View file

@ -65,6 +65,9 @@ end
module Make(O : Map.OrderedType) = struct
module S = Set.Make(O)
(* backport functions from recent stdlib.
they will be shadowed by inclusion of [S] if present. *)
let find_opt x s =
try Some (S.find x s)
with Not_found -> None