Additional operations on IReadOnlyDictionary<'Key, 'Value>
Function or value | Description |
Full Usage:
IReadOnlyDictionary.add key value table
Parameters:
'Key
value : 'Value
table : IReadOnlyDictionary<'Key, 'Value>
Returns: IReadOnlyDictionary<'Key, 'Value>
|
|
Full Usage:
IReadOnlyDictionary.chooseValues f x
Parameters:
'T -> 'U option
-
The mapping function.
x : IReadOnlyDictionary<'Key, 'T>
-
The input IReadOnlyDictionary.
Returns: IReadOnlyDictionary<'Key, 'U>
Returns IReadOnlyDictionary with values x for each dictionary value where the function returns Some(x).
|
|
Full Usage:
IReadOnlyDictionary.containsKey k dct
Parameters:
'Key
-
The key to find.
dct : IReadOnlyDictionary<'Key, 'Value>
-
The input IReadOnlyDictionary.
Returns: bool
A bool indicating if the key was found.
|
Note: this is a function wrapper for the IReadOnlyDictionary.ContainsKey method.
|
Full Usage:
IReadOnlyDictionary.intersect source1 source2
Parameters:
IReadOnlyDictionary<'Key, 'T>
source2 : IReadOnlyDictionary<'Key, 'T>
Returns: IReadOnlyDictionary<'Key, 'T>
|
![]() ![]() ![]() ![]() ![]() ![]() Returns the intersection of two read-only dictionaries, preferring values from the first in case of duplicate keys.
|
Full Usage:
IReadOnlyDictionary.intersectWith combiner source1 source2
Parameters:
'T -> 'T -> 'T
source1 : IReadOnlyDictionary<'Key, 'T>
source2 : IReadOnlyDictionary<'Key, 'T>
Returns: IReadOnlyDictionary<'Key, 'T>
|
![]() ![]() ![]() ![]() ![]() ![]() Returns the intersection of two read-only dictionaries, using the combiner function for duplicate keys.
|
Full Usage:
IReadOnlyDictionary.keys source
Parameters:
IReadOnlyDictionary<'Key, 'Value>
-
The input IReadOnlyDictionary.
Returns: seq<'Key>
A seq of the keys in the IReadOnlyDictionary.
|
|
Full Usage:
IReadOnlyDictionary.map f x
Parameters:
'T -> 'U
-
The mapping function.
x : IReadOnlyDictionary<'Key, 'T>
-
The input IReadOnlyDictionary.
Returns: IReadOnlyDictionary<'Key, 'U>
The mapped IReadOnlyDictionary.
|
|
Full Usage:
IReadOnlyDictionary.map2 f x y
Parameters:
'T1 -> 'T2 -> 'U
-
The mapping function.
x : IReadOnlyDictionary<'Key, 'T1>
-
The first input IReadOnlyDictionary.
y : IReadOnlyDictionary<'Key, 'T2>
-
The second input IReadOnlyDictionary.
Returns: IReadOnlyDictionary<'Key, 'U>
The combined IReadOnlyDictionary.
|
![]() ![]() ![]() ![]() ![]() ![]() Creates a read-only dictionary value from a pair of read-only dictionaries, using a function to combine them. Keys that are not present on both read-only dictionaries are dropped.
|
Full Usage:
IReadOnlyDictionary.remove key table
Parameters:
'Key
table : IReadOnlyDictionary<'Key, 'Value>
Returns: IReadOnlyDictionary<'Key, 'Value>
|
|
Full Usage:
IReadOnlyDictionary.tryGetValue k dct
Parameters:
'Key
-
The key whose value you wish to find.
dct : IReadOnlyDictionary<'Key, 'Value>
-
The input IReadOnlyDictionary.
Returns: 'Value option
An option wrapped value.
|
This is a function wrapper for the IReadOnlyDictionary.TryGetValue method,
representing the result as an Option
|
Full Usage:
IReadOnlyDictionary.union source altSource
Parameters:
IReadOnlyDictionary<'Key, 'T>
altSource : IReadOnlyDictionary<'Key, 'T>
Returns: IReadOnlyDictionary<'Key, 'T>
|
![]() ![]() ![]() ![]() ![]() ![]() Returns the union of two read-only dictionaries, preferring values from the first in case of duplicate keys.
|
Full Usage:
IReadOnlyDictionary.unionWith combiner source1 source2
Parameters:
'Value -> 'Value -> 'Value
source1 : IReadOnlyDictionary<'Key, 'Value>
source2 : IReadOnlyDictionary<'Key, 'Value>
Returns: IReadOnlyDictionary<'Key, 'Value>
|
|
Full Usage:
IReadOnlyDictionary.unzip source
Parameters:
IReadOnlyDictionary<'Key, ('T1 * 'T2)>
-
The source IReadOnlyDictionary.
Returns: IReadOnlyDictionary<'Key, 'T1> * IReadOnlyDictionary<'Key, 'T2>
A tuple of each untupled IReadOnlyDictionary.
|
|
Full Usage:
IReadOnlyDictionary.values source
Parameters:
IReadOnlyDictionary<'Key, 'Value>
-
The input IReadOnlyDictionary.
Returns: seq<'Value>
A seq of the values in the read-only dictionary.
|
|
Full Usage:
IReadOnlyDictionary.zip x y
Parameters:
IReadOnlyDictionary<'Key, 'T1>
-
The first input IReadOnlyDictionary.
y : IReadOnlyDictionary<'Key, 'T2>
-
The second input IReadOnlyDictionary.
Returns: IReadOnlyDictionary<'Key, ('T1 * 'T2)>
The tupled IReadOnlyDictionary.
|
Keys that are not present on both read-only dictionaries are dropped.
|