Basic operations on NonEmptyList
Function or value | Description | ||
Full Usage:
NonEmptyList.average list
Parameters:
NonEmptyList<^T>
-
The input list.
Returns: ^T
The resulting average.
Modifiers: inline Type parameters: ^T |
|||
Full Usage:
NonEmptyList.averageBy projection list
Parameters:
'T -> ^U
-
The function to transform the list elements into the type to be averaged.
list : NonEmptyList<'T>
-
The input list.
Returns: ^U
The resulting average.
Modifiers: inline Type parameters: 'T, ^U |
|
||
Full Usage:
NonEmptyList.choice list
Parameters:
NonEmptyList<^Alt<'T>>
Returns: ^Alt<'T>
Modifiers: inline Type parameters: ^Alt<'T> |
|||
Full Usage:
NonEmptyList.cons e arg2
Parameters:
'a
arg1 : NonEmptyList<'a>
Returns: NonEmptyList<'a>
|
|||
|
|||
Full Usage:
NonEmptyList.distinct list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The resulting list without duplicates.
|
|
||
Full Usage:
NonEmptyList.gather f source
Parameters:
'T -> ^ZipFunctor<'U>
source : NonEmptyList<'T>
Returns: ^e
Modifiers: inline |
|||
|
|||
|
|||
Full Usage:
NonEmptyList.map f arg2
Parameters:
'a -> 'b
arg1 : NonEmptyList<'a>
Returns: NonEmptyList<'b>
|
|||
Full Usage:
NonEmptyList.map2Shortest f l1 l2
Parameters:
'a -> 'b -> 'c
l1 : NonEmptyList<'a>
l2 : NonEmptyList<'b>
Returns: NonEmptyList<'c>
|
|||
Full Usage:
NonEmptyList.map3Shortest f l1 l2 l3
Parameters:
'a -> 'b -> 'c -> 'd
l1 : NonEmptyList<'a>
l2 : NonEmptyList<'b>
l3 : NonEmptyList<'c>
Returns: NonEmptyList<'d>
|
|
||
Full Usage:
NonEmptyList.mapi f arg2
Parameters:
int -> 'a -> 'b
arg1 : NonEmptyList<'a>
Returns: NonEmptyList<'b>
|
|||
Full Usage:
NonEmptyList.max list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: 'T
The maximum element.
|
|||
Full Usage:
NonEmptyList.maxBy projection list
Parameters:
'T -> 'U
-
The function to transform the list elements into the type to be compared.
list : NonEmptyList<'T>
-
The input list.
Returns: 'T
The maximum element.
|
|
||
Full Usage:
NonEmptyList.min list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: 'T
The minimum value.
|
|||
Full Usage:
NonEmptyList.minBy projection list
Parameters:
'T -> 'U
-
The function to transform list elements into the type to be compared.
list : NonEmptyList<'T>
-
The input list.
Returns: 'T
The minimum value.
|
|
||
Full Usage:
NonEmptyList.ofArray array
Parameters:
'a array
-
The input array.
Returns: NonEmptyList<'a>
Non empty list containing the elements of the array.
|
Throws exception for empty array
|
||
Full Usage:
NonEmptyList.ofList list
Parameters:
'c list
-
The input list.
Returns: NonEmptyList<'c>
Non empty list containing the elements of the list.
|
Throws exception for empty list
|
||
|
|
||
Full Usage:
NonEmptyList.ofSeq seq
Parameters:
'b seq
-
The input list.
Returns: NonEmptyList<'b>
Non empty list containing the elements of the list.
|
Throws exception for empty list
|
||
Full Usage:
NonEmptyList.range start stop
Parameters:
^T
stop : ^T
Returns: NonEmptyList<^T>
Modifiers: inline Type parameters: ^T |
|||
Full Usage:
NonEmptyList.reduce reduction list
Parameters:
'T -> 'T -> 'T
-
The function to reduce two list elements to a single element.
list : NonEmptyList<'T>
-
The input list.
Returns: 'T
The final reduced value.
|
Applies a function to each element of the list, threading an accumulator argument
through the computation. Apply the function to the first two elements of the list.
Then feed this result into the function along with the third element and so on.
Return the final result. If the input function is
|
||
Full Usage:
NonEmptyList.reduceBack reduction list
Parameters:
'T -> 'T -> 'T
-
A function that takes in the next-to-last element of the list and the
current accumulated result to produce the next accumulated result.
list : NonEmptyList<'T>
-
The input list.
Returns: 'T
The final result of the reductions.
|
|
||
Full Usage:
NonEmptyList.sequence source
Parameters:
NonEmptyList<^Functor<'T>>
Returns: ^Functor
Modifiers: inline |
|||
|
|||
|
Throws exception for empty tail
|
||
Full Usage:
NonEmptyList.tails s
Parameters:
NonEmptyList<'a>
Returns: NonEmptyList<NonEmptyList<'a>>
|
|
||
|
|||
|
|||
Full Usage:
NonEmptyList.toNonEmptySeq list
Parameters:
NonEmptyList<'a>
Returns: NonEmptySeq<'a>
|
|
||
|
|||
Full Usage:
NonEmptyList.transpose source
Parameters:
NonEmptyList<^ZipFunctor<'T>>
Returns: ^Functor
Modifiers: inline |
|||
Full Usage:
NonEmptyList.traverse f source
Parameters:
'T -> ^Functor<'U>
source : NonEmptyList<'T>
Returns: ^Functor
Modifiers: inline |
|||
|
|||
Full Usage:
NonEmptyList.unzip list
Parameters:
NonEmptyList<'T1 * 'T2>
-
The input list.
Returns: NonEmptyList<'T1> * NonEmptyList<'T2>
Two lists of split elements.
|
|
||
Full Usage:
NonEmptyList.zip list1 list2
Parameters:
NonEmptyList<'T>
-
The first input list.
list2 : NonEmptyList<'U>
-
The second input list.
Returns: NonEmptyList<'T * 'U>
A single list containing pairs of matching elements from the input lists.
|
|
||
Full Usage:
NonEmptyList.zipShortest list1 list2
Parameters:
NonEmptyList<'T>
-
First input list.
list2 : NonEmptyList<'U>
-
Second input list.
Returns: NonEmptyList<'T * 'U>
List with corresponding pairs of input lists.
|
|