Additional operations on Dictionary<'Key, 'Value>
Function or value | Description |
Full Usage:
Dictionary.chooseValues mapper source
Parameters:
'T -> 'U option
-
The mapping function.
source : IDictionary<'Key, 'T>
-
The input dictionary.
Returns: Dictionary<'Key, 'U>
Returns dictionary with values x for each dictionary value where the function returns Some(x).
|
|
Full Usage:
Dictionary.choosei chooser source
Parameters:
'Key -> 'T -> 'U option
-
The mapping function, taking key and element as parameters.
source : IDictionary<'Key, 'T>
-
The input dictionary.
Returns: Dictionary<'Key, 'U>
Dictionary with values (k, x) for each dictionary value where the function returns Some(x).
|
|
Full Usage:
Dictionary.containsKey key source
Parameters:
'Key
-
The key to find.
source : Dictionary<'Key, 'Value>
-
The input dictionary.
Returns: bool
A bool indicating if the key was found
|
Note: this is a function wrapper for the Dictionary.ContainsKey method.
|
Full Usage:
Dictionary.intersect source1 source2
Parameters:
Dictionary<'Key, 'T>
source2 : Dictionary<'Key, 'T>
Returns: Dictionary<'Key, 'T>
|
|
Full Usage:
Dictionary.intersectWith combiner source1 source2
Parameters:
'T -> 'T -> 'T
source1 : Dictionary<'Key, 'T>
source2 : Dictionary<'Key, 'T>
Returns: Dictionary<'Key, 'T>
|
|
Full Usage:
Dictionary.keys source
Parameters:
Dictionary<'a, 'b>
-
The input dictionary.
Returns: 'a seq
A seq of the keys in the dictionary.
|
|
Full Usage:
Dictionary.map mapping source
Parameters:
'T -> 'U
-
The mapping function.
source : Dictionary<'Key, 'T>
-
The input dictionary.
Returns: Dictionary<'Key, 'U>
The mapped dictionary.
|
|
Full Usage:
Dictionary.map2 mapping source1 source2
Parameters:
'T1 -> 'T2 -> 'U
-
The mapping function.
source1 : Dictionary<'Key, 'T1>
-
The first input dictionary.
source2 : Dictionary<'Key, 'T2>
-
The second input dictionary.
Returns: Dictionary<'Key, 'U>
The combined dictionary.
|
Keys that are not present on both dictionaries are dropped.
|
Full Usage:
Dictionary.map3 mapping source1 source2 source3
Parameters:
'T1 -> 'T2 -> 'T3 -> 'U
-
The mapping function.
source1 : Dictionary<'Key, 'T1>
-
First input Dictionary.
source2 : Dictionary<'Key, 'T2>
-
Second input Dictionary.
source3 : Dictionary<'Key, 'T3>
-
Third input Dictionary.
Returns: Dictionary<'Key, 'U>
The mapped Dictionary.
|
Keys that are not present on every Dictionary are dropped.
|
Full Usage:
Dictionary.toIReadOnlyDictionary source
Parameters:
Dictionary<'Key, 'Value>
Returns: IReadOnlyDictionary<'Key, 'Value>
|
|
Full Usage:
Dictionary.tryGetValue key source
Parameters:
'Key
-
The key to find.
source : Dictionary<'Key, 'Value>
-
The input dictionary.
Returns: 'Value option
An option wrapped value
|
Note: this is a function wrapper for the Dictionary.TryGetValue method,
which also represents the result as an Option
|
Full Usage:
Dictionary.union source altSource
Parameters:
Dictionary<'Key, 'T>
altSource : Dictionary<'Key, 'T>
Returns: Dictionary<'Key, 'T>
|
|
Full Usage:
Dictionary.unionWith combiner source1 source2
Parameters:
'Value -> 'Value -> 'Value
source1 : Dictionary<'Key, 'Value>
source2 : Dictionary<'Key, 'Value>
Returns: Dictionary<'Key, 'Value>
|
|
Full Usage:
Dictionary.unzip source
Parameters:
Dictionary<'Key, ('T1 * 'T2)>
-
The source dictionary.
Returns: Dictionary<'Key, 'T1> * Dictionary<'Key, 'T2>
A tuple of each untupled dictionary.
|
|
Full Usage:
Dictionary.values source
Parameters:
Dictionary<'a, 'b>
-
The input dictionary.
Returns: 'b seq
A seq of the values in the dictionary.
|
|
Full Usage:
Dictionary.zip source1 source2
Parameters:
Dictionary<'Key, 'T1>
-
The first input dictionary.
source2 : Dictionary<'Key, 'T2>
-
The second input dictionary.
Returns: Dictionary<'Key, ('T1 * 'T2)>
The tupled dictionary.
|
Keys that are not present on both dictionaries are dropped.
|