mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-01-22 17:16:41 -05:00
small comment
This commit is contained in:
parent
2fbf765466
commit
f65bcd212d
2 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue