Skip to content

Commit 49bdfb0

Browse files
svicklatkin
authored andcommitted
Clarify what happens when you add existing key to Map
fixes dotnet/fsharp#524 closes dotnet/fsharp#525
1 parent 875a58c commit 49bdfb0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/fsharp/FSharp.Core/map.fsi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ namespace Microsoft.FSharp.Collections
1616
[<CompiledName("FSharpMap`2")>]
1717
[<Sealed>]
1818
type Map<[<EqualityConditionalOn>]'Key,[<EqualityConditionalOn;ComparisonConditionalOn>]'Value when 'Key : comparison> =
19-
/// <summary>Returns a new map with the binding added to the given map.</summary>
19+
/// <summary>Returns a new map with the binding added to the given map.
20+
/// If a binding with the given key already exists in the input map, the existing binding is replaced by the new binding in the result map.</summary>
2021
/// <param name="key">The input key.</param>
2122
/// <returns>The resulting map.</returns>
2223
member Add: key:'Key * value:'Value -> Map<'Key,'Value>
@@ -67,7 +68,8 @@ namespace Microsoft.FSharp.Collections
6768
[<RequireQualifiedAccess>]
6869
module Map =
6970

70-
/// <summary>Returns a new map with the binding added to the given map.</summary>
71+
/// <summary>Returns a new map with the binding added to the given map.
72+
/// If a binding with the given key already exists in the input map, the existing binding is replaced by the new binding in the result map.</summary>
7173
/// <param name="key">The input key.</param>
7274
/// <param name="value">The input value.</param>
7375
/// <param name="table">The input map.</param>

0 commit comments

Comments
 (0)