@@ -17,16 +17,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717* The ` FlatListBuilder ` module works on the builder of a flat list, and ` flatList { } ` builds a flat list.
1818* ` HashMap ` has every function of the FSharp.Core ` Map ` module that applies to a hash map, with its semantics and
1919 exceptions, plus ` choose ` and ` singleton ` , the builder functions, and the wrappers of the ` ImmutableDictionary ` members
20- ` addRange ` , ` clear ` , ` containsValue ` , ` emptyWithComparers ` , ` emptyWithKeyComparer ` , ` keyComparer ` , ` ofKeyValuePairs ` ,
21- ` ofKeyValuePairsWithKeyComparer ` , ` ofSeqBy ` , ` ofSeqWithKeyComparer ` , ` removeRange ` , ` setItem ` , ` setItems ` , ` tryGetKey ` ,
22- ` valueComparer ` , ` withComparers ` and ` withKeyComparer ` , which keep the semantics of the BCL.
20+ ` addRange ` , ` clear ` , ` containsValue ` , ` keyComparer ` , ` ofSeqBy ` , ` removeRange ` , ` setItem ` , ` setItems ` , ` tryGetKey ` and
21+ ` valueComparer ` , which keep the semantics of the BCL.
22+ * ` HashMap.ofArray ` , ` HashMap.ofList ` and ` HashMap.ofSeq ` take the bindings as ` KeyValuePair ` s, reference tuples or struct
23+ tuples: they are static members of ` ImmutableDictionary<'Key, 'Value> ` in the auto-opened ` HashMapExtensions ` module, one
24+ overload per shape, and every shape keeps the last binding of a repeated key, as ` Map.ofSeq ` does. They take a
25+ dictionary, an F# ` Map ` or another hash map too. C# does not see them as members.
26+ * ` HashMap.forComparers ` and ` HashMap.forKeyComparer ` return a ` CustomComparersHashMap<'Key, 'Value> ` struct whose members
27+ ` empty ` , ` singleton ` , ` ofArray ` , ` ofList ` , ` ofSeq ` , ` ofSeqBy ` and ` builder ` create hash maps with its comparers:
28+ ` (HashMap.forKeyComparer StringComparer.OrdinalIgnoreCase).ofSeq pairs ` . Its ` ofSeq ` gives an existing map the comparers
29+ of the struct. A ` null ` comparer throws ` ArgumentNullException ` .
30+ * ` HashMap.addRange ` and ` HashMap.setItems ` take ` KeyValuePair ` s; the nested modules ` HashMap.Tuple ` and
31+ ` HashMap.ValueTuple ` take reference and struct tuples: ` HashMap.Tuple.addRange pairs table ` .
2332* The ` IMap ` module works on any ` IImmutableDictionary<'Key, 'Value> ` with the same functions, except the creation, builder
24- and comparer functions and ` containsValue ` . Its transformations keep the implementation and the comparers of the map;
25- ` map ` and ` choose ` return a ` HashMap ` .
33+ and comparer functions and ` containsValue ` , and has the nested modules ` Tuple ` and ` ValueTuple ` too. Its transformations
34+ keep the implementation and the comparers of the map; ` map ` and ` choose ` return a ` HashMap ` .
2635* The ` FSharp.Collections.Immutable.Option ` and ` FSharp.Collections.Immutable.Tuple ` namespaces have ` HashMap ` and ` IMap `
27- modules that repeat the functions that use value options or struct tuples with options and reference tuples.
36+ modules that repeat the functions that use value options or return struct tuples with options and reference tuples.
2837* ` hashMap { } ` builds a hash map from ` yield struct (key, value) ` and ` yield KeyValuePair (key, value) ` ; ` HashMapCE ` takes
29- a key comparer.
38+ a key comparer, and a ` null ` one throws ` ArgumentNullException ` .
3039
3140### Changed
3241
@@ -37,12 +46,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3746* ` FlatList ` : every function throws what the FSharp.Core ` Array ` function of the same name throws. ` take ` and ` splitAt `
3847 throw for a count beyond the length, and a default ` ImmutableArray ` throws ` ArgumentNullException ` .
3948* ` HashMap ` : ` tryFind ` and ` tryPick ` return ` voption ` , and ` pick ` and ` tryPick ` take choosers that return ` voption ` .
40- ` ofArray ` , ` ofList ` , ` ofSeq ` , ` toArray ` , ` toList ` and ` toSeq ` take and return struct tuples instead of ` KeyValuePair ` s;
41- ` ofKeyValuePairs ` takes ` KeyValuePair ` s.
49+ ` toArray ` , ` toList ` and ` toSeq ` return struct tuples instead of ` KeyValuePair ` s.
4250* ` HashMap ` follows the FSharp.Core ` Map ` module: ` add ` replaces the value of an existing key instead of throwing, ` ofArray `
43- and ` ofSeq ` keep the last binding of a repeated key, ` filter ` returns a map instead of a sequence, ` map ` keeps the keys
44- and takes a function of the key and the value, ` singleton ` takes the key and the value curried, and ` find ` , ` findKey `
45- and ` pick ` throw the ` KeyNotFoundException ` of ` Map ` . A ` null ` map throws ` ArgumentNullException ` .
51+ and ` ofSeq ` keep the last binding of a repeated key instead of throwing , ` filter ` returns a map instead of a sequence,
52+ ` map ` keeps the keys and takes a function of the key and the value, ` singleton ` takes the key and the value curried, and
53+ ` find ` , ` findKey ` and ` pick ` throw the ` KeyNotFoundException ` of ` Map ` . A ` null ` map throws ` ArgumentNullException ` .
4654* ` HashMap ` : every transformation keeps the key comparer of the map, and the value comparer when the type of the values
4755 does not change.
4856
@@ -53,8 +61,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5361* ` FlatList.removeAll ` , ` removeAllWith ` , ` removeRange ` , ` sortRange ` , ` sortRangeWith ` , ` sortRangeWithComparer ` and ` sub ` ,
5462 and the ` ImmutableArray ` module alias of ` FlatList ` .
5563* The ` Seq ` module of conversions between the collections.
56- * ` HashMap.length ` , ` append ` , ` except ` , ` where ` , ` ofKeyComparer ` and ` ofComparers ` : use ` count ` , ` addRange ` , ` removeRange ` ,
57- ` filter ` , ` emptyWithKeyComparer ` and ` emptyWithComparers ` .
64+ * ` HashMap.length ` , ` append ` , ` except ` and ` where ` : use ` count ` , ` addRange ` , ` removeRange ` and ` filter ` .
65+ * ` HashMap.ofKeyComparer ` , ` ofComparers ` , ` builderWithKeyComparer ` and ` builderWithComparers ` : use the members ` empty ` and
66+ ` builder ` of ` HashMap.forKeyComparer ` and ` HashMap.forComparers ` .
5867* ` HashMap.vTryFind ` , ` vTryPick ` and ` ofSeqWith ` : use ` tryFind ` , ` tryPick ` and ` ofSeqBy ` .
5968* ` HashMap.ofSeqGroupBy ` , ` HashMap.check ` and the ` HashMapBuilder ` abbreviation: group with the ` groupBy ` of a collection
6069 module and pass the groups to ` HashMap.ofSeq ` , and use ` HashMap<'Key, 'Value>.Builder ` .
0 commit comments