FSharpx.Collections


PersistentHashMap Module

Defines functions which allow to access and manipulate PersistentHashMaps.

Functions and values

Function or value Description

PersistentHashMap.add key value map

Full Usage: PersistentHashMap.add key value map

Parameters:
Returns: PersistentHashMap<'T, 'S>

O(log32n), adds an element to the map

key : 'T
value : 'S
map : PersistentHashMap<'T, 'S>
Returns: PersistentHashMap<'T, 'S>

PersistentHashMap.containsKey key map

Full Usage: PersistentHashMap.containsKey key map

Parameters:
Returns: bool

O(log32n), returns if the key exists in the map

key : 'T
map : PersistentHashMap<'T, 'S>
Returns: bool

PersistentHashMap.count map

Full Usage: PersistentHashMap.count map

Parameters:
Returns: int

O(1), returns the count of the elements in the PersistentHashMap

map : PersistentHashMap<'T, 'S>
Returns: int

PersistentHashMap.empty

Full Usage: PersistentHashMap.empty

Returns: PersistentHashMap<'T, 'S>

O(1), returns an empty PersistentHashMap

Returns: PersistentHashMap<'T, 'S>

PersistentHashMap.find key map

Full Usage: PersistentHashMap.find key map

Parameters:
Returns: 'S

O(log32n), returns the value if the exists in the map

key : 'T
map : PersistentHashMap<'T, 'S>
Returns: 'S

PersistentHashMap.length map

Full Usage: PersistentHashMap.length map

Parameters:
Returns: int

O(1), returns the count of the elements in the PersistentHashMap (same as count)

map : PersistentHashMap<'T, 'S>
Returns: int

PersistentHashMap.map f map

Full Usage: PersistentHashMap.map f map

Parameters:
Returns: PersistentHashMap<'T, 'S1>

O(n). Returns a HashMap whose elements are the results of applying the supplied function to each of the elements of a supplied HashMap.

f : 'S -> 'S1
map : PersistentHashMap<'T, 'S>
Returns: PersistentHashMap<'T, 'S1>

PersistentHashMap.ofSeq items

Full Usage: PersistentHashMap.ofSeq items

Parameters:
    items : seq<'T * 'S>

Returns: PersistentHashMap<'T, 'S>

O(n). Returns a HashMap of the seq.

items : seq<'T * 'S>
Returns: PersistentHashMap<'T, 'S>

PersistentHashMap.remove key map

Full Usage: PersistentHashMap.remove key map

Parameters:
Returns: PersistentHashMap<'T, 'S>

O(log32n), removes the element with the given key from the map

key : 'T
map : PersistentHashMap<'T, 'S>
Returns: PersistentHashMap<'T, 'S>

PersistentHashMap.toSeq map

Full Usage: PersistentHashMap.toSeq map

Parameters:
Returns: seq<'T * 'S>

O(n). Views the given HashMap as a sequence.

map : PersistentHashMap<'T, 'S>
Returns: seq<'T * 'S>