FSharpAux


Dictionary

Namespace: FSharpAux

.Net Dictionary

Functions and values

Function or valueDescription
addInPlace key value table
Signature: key:'?8830 -> value:'?8831 -> table:IDictionary<'?8830,'?8831> -> IDictionary<'?8830,'?8831>
Type parameters: '?8830, '?8831

Returns the dictionary with the binding added to the given dictionary. If a binding with the given key already exists in the input dictionary, System.ArgumentException is thrown.

addOrUpdateInPlace key value table
Signature: key:'?8833 -> value:'?8834 -> table:IDictionary<'?8833,'?8834> -> IDictionary<'?8833,'?8834>
Type parameters: '?8833, '?8834

Returns the dictionary with the binding added to the given dictionary. If a binding with the given key already exists in the input dictionary, the existing binding is replaced by the new binding in the result dictionary.

addOrUpdateInPlaceBy f key value table
Signature: f:('?8836 -> '?8836 -> '?8836) -> key:'?8837 -> value:'?8836 -> table:IDictionary<'?8837,'?8836> -> IDictionary<'?8837,'?8836>
Type parameters: '?8836, '?8837

Returns the dictionary with the binding added to the given dictionary. If a binding with the given key already exists in the input dictionary, the existing binding is replaced by the result of the given function.

containsKey key table
Signature: key:'?8842 -> table:IDictionary<'?8842,'?8843> -> bool
Type parameters: '?8842, '?8843

Tests if an element is in the domain of the dictionary.

count(table)
Signature: table:IDictionary<'?8845,'?8846> -> int
Type parameters: '?8845, '?8846

The number of bindings in the dictionary.

isEmpty(table)
Signature: table:IDictionary<'?8839,'?8840> -> bool
Type parameters: '?8839, '?8840

Returns true if there are no bindings in the dictionary.

item key table
Signature: key:'?8848 -> table:IDictionary<'?8848,'?8849> -> '?8849
Type parameters: '?8848, '?8849

Lookup an element in the dictionary. Raise KeyNotFoundException if no binding exists in the dictionary.

merge a b f
Signature: a:IDictionary<'k,'v> -> b:IDictionary<'k,'v> -> f:('k -> 'v -> 'v -> 'v) -> IDictionary<'k,'v>
Type parameters: 'k, 'v

Merge two Dictionaries

ofArray(a)
Signature: a:('k * 'v) [] -> IDictionary<'k,'v>
Type parameters: 'k, 'v

Builds a dictionary that contains the bindings of the given array.

ofList(l)
Signature: l:('k * 'v) list -> IDictionary<'k,'v>
Type parameters: 'k, 'v

Builds a dictionary that contains the bindings of the given list.

ofMap(m)
Signature: m:Map<'k,'v> -> IDictionary<'k,'v>
Type parameters: 'k, 'v

Builds a dictionary that contains the bindings of the given dictionary.

ofSeq(s)
Signature: s:seq<'k * 'v> -> IDictionary<'k,'v>
Type parameters: 'k, 'v

Builds a dictionary that contains the bindings of the given IEnumerable.

remove key table
Signature: key:'Key -> table:IDictionary<'Key,'?8852> -> IDictionary<'Key,'?8852>
Type parameters: 'Key, '?8852

Removes an element from the domain of the dictionary. No exception is raised if the element is not present.

toArray(d)
Signature: d:IDictionary<'?8812,'?8813> -> ('?8812 * '?8813) []
Type parameters: '?8812, '?8813

Returns a new dictionary made from the given bindings.

toList(d)
Signature: d:IDictionary<'?8815,'?8816> -> ('?8815 * '?8816) list
Type parameters: '?8815, '?8816

Returns a new dictionary made from the given bindings.

toSeq(d)
Signature: d:seq<KeyValuePair<'?8809,'?8810>> -> seq<'?8809 * '?8810>
Type parameters: '?8809, '?8810

Views the collection as an enumerable sequence of pairs. The sequence will be ordered by the keys of the dictionary.

tryFind key table
Signature: key:'?8854 -> table:IDictionary<'?8854,'?8855> -> '?8855 option
Type parameters: '?8854, '?8855

Lookup an element in the dictionary, returning a Some value if the element is in the domain of the dictionary and None if not.

Fork me on GitHub