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