Basic operations on NonEmptyMap
Function or value | Description | ||
Full Usage:
NonEmptyMap.add key value table
Parameters:
'a
-
The input key.
value : 'b
-
The input value.
table : NonEmptyMap<'a, 'b>
-
The input map.
Returns: NonEmptyMap<'a, 'b>
The resulting map.
|
|
||
Full Usage:
NonEmptyMap.containsKey key table
Parameters:
'a
-
The input key.
table : NonEmptyMap<'a, 'b>
-
The input map.
Returns: bool
True if the map contains the key.
|
|
||
|
|||
Full Usage:
NonEmptyMap.create (k, v) rest
Parameters:
'k
v : 'v
rest : ('k * 'v) seq
Returns: NonEmptyMap<'k, 'v>
|
|||
Full Usage:
NonEmptyMap.exists predicate table
Parameters:
'a -> 'b -> bool
-
The function to test the input elements.
table : NonEmptyMap<'a, 'b>
-
The input map.
Returns: bool
True if the predicate returns true for one of the key/value pairs.
|
|
||
Full Usage:
NonEmptyMap.find key table
Parameters:
'a
-
The input key.
table : NonEmptyMap<'a, 'b>
-
The input map.
Returns: 'b
The value mapped to the given key.
|
|
||
Full Usage:
NonEmptyMap.findKey predicate table
Parameters:
'a -> 'b -> bool
-
The function to test the input elements.
table : NonEmptyMap<'a, 'b>
-
The input map.
Returns: 'a
The first key for which the predicate evaluates true.
|
|
||
Full Usage:
NonEmptyMap.fold folder state table
Parameters:
'a -> 'b -> 'c -> 'a
-
The function to update the state given the input key/value pairs.
state : 'a
-
The initial state.
table : NonEmptyMap<'b, 'c>
-
The input map.
Returns: 'a
The final state value.
|
|
||
Full Usage:
NonEmptyMap.foldBack folder table state
Parameters:
'a -> 'b -> 'c -> 'c
-
The function to update the state given the input key/value pairs.
table : NonEmptyMap<'a, 'b>
-
The input map.
state : 'c
-
The initial state.
Returns: 'c
The final state value.
|
|
||
Full Usage:
NonEmptyMap.forall predicate table
Parameters:
'a -> 'b -> bool
-
The function to test the input elements.
table : NonEmptyMap<'a, 'b>
-
The input map.
Returns: bool
True if the predicate evaluates to true for all of the bindings in the map.
|
|
||
Full Usage:
NonEmptyMap.iter action table
Parameters:
'a -> 'b -> unit
-
The function to apply to each key/value pair.
table : NonEmptyMap<'a, 'b>
-
The input map.
|
|
||
|
|
||
|
|
||
Full Usage:
NonEmptyMap.map mapping table
Parameters:
'a -> 'b -> 'c
-
The function to transform the key/value pairs.
table : NonEmptyMap<'a, 'b>
-
The input map.
Returns: NonEmptyMap<'a, 'c>
The resulting map of keys and transformed values.
|
|
||
Full Usage:
NonEmptyMap.mapValues f x
Parameters:
'T -> 'a
-
The mapping function.
x : NonEmptyMap<'Key, 'T>
-
The input Map.
Returns: NonEmptyMap<'Key, 'a>
The mapped Map.
|
Keys remain unchanged.
|
||
Full Usage:
NonEmptyMap.ofArray array
Parameters:
('a * 'b) array
-
The input array.
Returns: NonEmptyMap<'a, 'b>
Non empty map containing the elements of the array.
|
Throws exception for empty array
|
||
Full Usage:
NonEmptyMap.ofList list
Parameters:
('a * 'b) list
-
The input list.
Returns: NonEmptyMap<'a, 'b>
Non empty map containing the elements of the list.
|
Throws exception for empty list
|
||
Full Usage:
NonEmptyMap.ofMap map
Parameters:
Map<'a, 'b>
-
The input map.
Returns: NonEmptyMap<'a, 'b>
Non empty map containing the elements of the map.
|
Throws exception for empty map
|
||
Full Usage:
NonEmptyMap.ofNonEmptyList list
Parameters:
NonEmptyList<'a * 'b>
-
The input list.
Returns: NonEmptyMap<'a, 'b>
Non empty map containing the elements of the non-empty list.
|
|
||
Full Usage:
NonEmptyMap.ofNonEmptySeq source
Parameters:
NonEmptySeq<'a * 'b>
-
The input sequence.
Returns: NonEmptyMap<'a, 'b>
Non empty map containing the elements of the non-empty sequence.
|
|
||
Full Usage:
NonEmptyMap.ofSeq seq
Parameters:
('a * 'b) seq
-
The input list.
Returns: NonEmptyMap<'a, 'b>
Non empty map containing the elements of the list.
|
Throws exception for empty sequence
|
||
Full Usage:
NonEmptyMap.pick chooser table
Parameters:
'a -> 'b -> 'c option
-
The function to generate options from the key/value pairs.
table : NonEmptyMap<'a, 'b>
-
The input map.
Returns: 'c
The first result.
|
|
||
Full Usage:
NonEmptyMap.reduce reduction map
Parameters:
'a * 'b -> 'a * 'b -> 'a * 'b
map : NonEmptyMap<'a, 'b>
Returns: 'a * 'b
|
|
||
Full Usage:
NonEmptyMap.reduceBack reduction map
Parameters:
'a * 'b -> 'a * 'b -> 'a * 'b
map : NonEmptyMap<'a, 'b>
Returns: 'a * 'b
|
|
||
Full Usage:
NonEmptyMap.singleton key value
Parameters:
'a
value : 'b
Returns: NonEmptyMap<'a, 'b>
|
|||
|
|||
|
|||
|
|||
Full Usage:
NonEmptyMap.toNonEmptyList arg1
Parameters:
NonEmptyMap<'a, 'b>
Returns: NonEmptyList<'a * 'b>
|
|||
Full Usage:
NonEmptyMap.toNonEmptySeq arg1
Parameters:
NonEmptyMap<'a, 'b>
Returns: NonEmptySeq<'a * 'b>
|
|||
|
|||
Full Usage:
NonEmptyMap.traverse f m
Parameters:
'T -> ^Functor<'U>
m : NonEmptyMap<'K, 'T>
Returns: ^Functor
Modifiers: inline |
|
||
Full Usage:
NonEmptyMap.traversei f m
Parameters:
'K -> 'T -> ^Functor<'U>
m : NonEmptyMap<'K, 'T>
Returns: ^Functor
Modifiers: inline |
|
||
Full Usage:
NonEmptyMap.tryFind key table
Parameters:
'a
-
The input key.
table : NonEmptyMap<'a, 'b>
-
The input map.
Returns: 'b option
The found Some value or None .
|
|
||
Full Usage:
NonEmptyMap.tryFindKey predicate table
Parameters:
'a -> 'b -> bool
-
The function to test the input elements.
table : NonEmptyMap<'a, 'b>
-
The input map.
Returns: 'a option
The first key for which the predicate returns true or None if the predicate evaluates to false for each key/value pair.
|
|
||
Full Usage:
NonEmptyMap.tryOfMap map
Parameters:
Map<'a, 'b>
Returns: NonEmptyMap<'a, 'b> option
|
|||
Full Usage:
NonEmptyMap.tryPick chooser table
Parameters:
'a -> 'b -> 'c option
-
The function to generate options from the key/value pairs.
table : NonEmptyMap<'a, 'b>
-
The input map.
Returns: 'c option
The first result.
|
|
||
Full Usage:
NonEmptyMap.union source altSource
Parameters:
NonEmptyMap<'Key, 'T>
altSource : NonEmptyMap<'Key, 'T>
Returns: NonEmptyMap<'Key, 'T>
|
|||
Full Usage:
NonEmptyMap.unionWith combiner source1 source2
Parameters:
'Value -> 'Value -> 'Value
source1 : NonEmptyMap<'Key, 'Value>
source2 : NonEmptyMap<'Key, 'Value>
Returns: NonEmptyMap<'Key, 'Value>
|
|
||
Full Usage:
NonEmptyMap.unzip source
Parameters:
NonEmptyMap<'Key, ('T1 * 'T2)>
Returns: NonEmptyMap<'Key, 'T1> * NonEmptyMap<'Key, 'T2>
|
|
||
|
|