summaryrefslogtreecommitdiff
path: root/stdlib/map.mli
diff options
context:
space:
mode:
authoriguer <mohamed.iguernelala@gmail.com>2015-04-22 15:18:25 +0200
committeriguer <mohamed.iguernelala@gmail.com>2015-11-22 18:29:16 +0100
commitd689a686b922050ee94a042b04e2d49afce30cd7 (patch)
tree495217f86de68935018cfb0151d12d34bf2586ec /stdlib/map.mli
parent37159fbc42e8180afbf7c4c56358dc146c86f41c (diff)
downloadocaml-d689a686b922050ee94a042b04e2d49afce30cd7.tar.gz
Map.add x y m returns the original map if x is already bound to a value that is physically equal to y in m
Diffstat (limited to 'stdlib/map.mli')
-rw-r--r--stdlib/map.mli5
1 files changed, 4 insertions, 1 deletions
diff --git a/stdlib/map.mli b/stdlib/map.mli
index 4a6ced5c88..038531dc7d 100644
--- a/stdlib/map.mli
+++ b/stdlib/map.mli
@@ -77,7 +77,10 @@ module type S =
val add: key -> 'a -> 'a t -> 'a t
(** [add x y m] returns a map containing the same bindings as
[m], plus a binding of [x] to [y]. If [x] was already bound
- in [m], its previous binding disappears. *)
+ in [m] to a value that is physically equal to [y],
+ [m] is returned unchanged (the result of the function is
+ then physically equal to [m]). Otherwise, the previous binding
+ of [x] in [m] disappears. *)
val singleton: key -> 'a -> 'a t
(** [singleton x y] returns the one-element map that contains a binding [y]