Header menu logo TDesu.FSharp

Dictionary Module

Functions and values

Function or value Description

Dictionary.getOrDefault key defaultValue d

Full Usage: Dictionary.getOrDefault key defaultValue d

Parameters:
    key : 'TKey
    defaultValue : 'TValue
    d : 'a

Returns: 'TValue
Modifiers: inline
Type parameters: 'TKey, 'TValue, 'a

Get value or default — replaces match d.TryGetValue(k) with true, v -> v | _ -> def. The key to look up. The value to return if the key is not found. The dictionary to search.

key : 'TKey
defaultValue : 'TValue
d : 'a
Returns: 'TValue

Dictionary.getValue key d

Full Usage: Dictionary.getValue key d

Parameters:
    key : 'TKey
    d : 'a

Returns: 'TValue
Modifiers: inline
Type parameters: 'TKey, 'a, 'TValue

Gets the value for the given key; throws if key is missing. The key to look up. The dictionary to search.

key : 'TKey
d : 'a
Returns: 'TValue

Dictionary.tryGetValue key d

Full Usage: Dictionary.tryGetValue key d

Parameters:
    key : 'TKey
    d : 'a

Returns: 'TValue option
Modifiers: inline
Type parameters: 'TKey, 'a, 'TValue

Tries to get a value, returning Some(value) or None. The key to look up. The dictionary to search.

key : 'TKey
d : 'a
Returns: 'TValue option

Dictionary.tryGetValueV key d

Full Usage: Dictionary.tryGetValueV key d

Parameters:
    key : 'TKey
    d : 'a

Returns: 'TValue voption
Modifiers: inline
Type parameters: 'TKey, 'a, 'TValue

Tries to get a value, returning ValueSome(value) or ValueNone. The key to look up. The dictionary to search.

key : 'TKey
d : 'a
Returns: 'TValue voption

Type something to start searching.