Basic operations on NonEmptyList
| Function or value | Description | ||
Full Usage:
NonEmptyList.allPairs list1 list2
Parameters:
NonEmptyList<'T>
-
The first input list.
list2 : NonEmptyList<'U>
-
The second input list.
Returns: NonEmptyList<'T * 'U>
The resulting list of pairs.
Modifiers: inline Type parameters: 'T, 'U |
|
||
Full Usage:
NonEmptyList.append list1 list2
Parameters:
NonEmptyList<'T>
-
The first input list.
list2 : NonEmptyList<'T>
-
The second input list.
Returns: NonEmptyList<'T>
The resulting list.
Modifiers: inline Type parameters: 'T |
|
||
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.choose chooser list
Parameters:
'T -> 'a option
-
The function to be applied to the list elements.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'a>
The resulting list comprising the values v where the chooser function returned Some(x).
Modifiers: inline Type parameters: 'T, 'a |
|
||
Full Usage:
NonEmptyList.chunkBySize chunkSize list
Parameters:
int
-
The maximum size of each chunk.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<NonEmptyList<'T>>
The list divided into chunks.
Modifiers: inline Type parameters: 'T |
|
||
Full Usage:
NonEmptyList.collect mapping list
Parameters:
'T -> 'a seq
-
The function to transform each input element into a sublist to be concatenated.
list : NonEmptyList<'T>
-
The input list.
Returns: 'a seq
The concatenation of the transformed sublists.
Modifiers: inline Type parameters: 'T, 'a |
|
||
Full Usage:
NonEmptyList.compareWith comparer list1 list2
Parameters:
'T -> 'T -> int
-
A function that takes an element from each list and returns an int. If it evaluates to a non-zero value iteration is stopped and that value is returned.
list1 : NonEmptyList<'T>
-
The first input list.
list2 : NonEmptyList<'T>
-
The second input list.
Returns: int
Returns the first non-zero result from the comparison function.
If the first list has a larger element, the return value is always positive.
If the second list has a larger element, the return value is always negative.
When the elements are equal in the two lists, 1 is returned if the first list is longer, 0 is returned if they are equal in length, and -1 is returned when the second list is longer.
Modifiers: inline Type parameters: 'T |
|
||
Full Usage:
NonEmptyList.concat lists
Parameters:
NonEmptyList<NonEmptyList<'T>>
-
The input list of lists.
Returns: NonEmptyList<'T>
The resulting concatenated list.
Modifiers: inline Type parameters: 'T |
|
||
Full Usage:
NonEmptyList.cons e arg2
Parameters:
'a
arg1 : NonEmptyList<'a>
Returns: NonEmptyList<'a>
A new list with the element added to the beginning.
|
|
||
Full Usage:
NonEmptyList.contains value list
Parameters:
'T
-
The value to locate in the input list.
list : NonEmptyList<'T>
-
The input list.
Returns: bool
True if the input list contains the specified element; false otherwise.
Modifiers: inline Type parameters: 'T |
|
||
Full Usage:
NonEmptyList.countBy projection list
Parameters:
'T -> 'U
-
A function transforming each item of the input list into a key to be compared against the others.
list : NonEmptyList<'T>
-
The input list.
Returns: ('U * int) seq
The resulting list of unique keys and their number of occurrences.
Modifiers: inline Type parameters: 'T, 'U |
|
||
|
|||
Full Usage:
NonEmptyList.distinct list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The resulting list without duplicates.
|
|
||
Full Usage:
NonEmptyList.distinctBy projection list
Parameters:
'T -> 'U
-
A function transforming the list items into comparable keys.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The resulting list.
Modifiers: inline Type parameters: 'T, 'U |
|
||
Full Usage:
NonEmptyList.exactlyOne list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: 'T
The only element of the list.
Modifiers: inline Type parameters: 'T |
|
||
Full Usage:
NonEmptyList.except itemsToExclude list
Parameters:
'a
-
The sequence of items to exclude from the input list.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
A list that contains the distinct elements of list that do not appear in itemsToExclude.
Modifiers: inline Type parameters: 'a, 'T |
|
||
Full Usage:
NonEmptyList.exists predicate list
Parameters:
'T -> bool
-
The function to test the input elements.
list : NonEmptyList<'T>
-
The input list.
Returns: bool
True if any element satisfies the predicate.
Modifiers: inline Type parameters: 'T |
|
||
Full Usage:
NonEmptyList.exists2 predicate list1 list2
Parameters:
'T1 -> 'T2 -> bool
-
The function to test the input elements.
list1 : NonEmptyList<'T1>
-
The first input list.
list2 : NonEmptyList<'T2>
-
The second input list.
Returns: bool
True if any pair of elements satisfy the predicate.
Modifiers: inline Type parameters: 'T1, 'T2 |
|
||
Full Usage:
NonEmptyList.filter predicate list
Parameters:
'T -> bool
-
The function to test the input elements.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
A list containing only the elements that satisfy the predicate.
Modifiers: inline Type parameters: 'T |
|
||
Full Usage:
NonEmptyList.find predicate list
Parameters:
'T -> bool
-
The function to test the input elements.
list : NonEmptyList<'T>
-
The input list.
Returns: 'T
The first element that satisfies the predicate.
Modifiers: inline Type parameters: 'T |
Returns the first element for which the given function returns True. Raises KeyNotFoundException if no such element exists.
|
||
Full Usage:
NonEmptyList.findBack predicate list
Parameters:
'T -> bool
-
The function to test the input elements.
list : NonEmptyList<'T>
-
The input list.
Returns: 'T
The first element that satisfies the predicate.
Modifiers: inline Type parameters: 'T |
Returns the last element for which the given function returns True. Raises KeyNotFoundException if no such element exists.
|
||
Full Usage:
NonEmptyList.findIndex predicate list
Parameters:
'T -> bool
-
The function to test the input elements.
list : NonEmptyList<'T>
-
The input list.
Returns: int
The first element that satisfies the predicate.
Modifiers: inline Type parameters: 'T |
Returns the index of the first element in the list that satisfies the given predicate. Raises KeyNotFoundException if no such element exists.
|
||
Full Usage:
NonEmptyList.findIndexBack predicate list
Parameters:
'T -> bool
-
The function to test the input elements.
list : NonEmptyList<'T>
-
The input list.
Returns: int
The first element that satisfies the predicate.
Modifiers: inline Type parameters: 'T |
Returns the index of the last element in the list that satisfies the given predicate. Raises KeyNotFoundException if no such element exists.
|
||
Full Usage:
NonEmptyList.fold folder state list
Parameters:
'State -> 'T -> 'State
-
The function to update the state given the input elements.
state : 'State
-
The initial state.
list : NonEmptyList<'T>
-
The input list.
Returns: 'State
The final state value.
Modifiers: inline Type parameters: 'State, 'T |
Applies a function to each element of the collection, threading an accumulator argument through the computation.
Take the second argument, and apply the function to it and the first element of the list.
Then feed this result into the function along with the second element and so on.
Return the final result.
If the input function is
|
||
Full Usage:
NonEmptyList.fold2 folder state list1 list2
Parameters:
'State -> 'T1 -> 'T2 -> 'State
-
The function to update the state given the input elements.
state : 'State
-
The initial state.
list1 : NonEmptyList<'T1>
-
The first input list.
list2 : NonEmptyList<'T2>
-
The second input list.
Returns: 'State
The final state value.
Modifiers: inline Type parameters: 'State, 'T1, 'T2 |
|
||
Full Usage:
NonEmptyList.foldBack folder list state
Parameters:
'T -> 'State -> 'State
-
The function to update the state given the input elements.
list : NonEmptyList<'T>
-
The input list.
state : 'State
-
The initial state.
Returns: 'State
The final state value.
Modifiers: inline Type parameters: 'T, 'State |
Applies a function to each element of the collection, starting from the end, threading an accumulator argument through the computation.
Take the second argument, and apply the function to it and the first element of the list.
Then feed this result into the function along with the second element and so on.
Return the final result.
If the input function is
|
||
Full Usage:
NonEmptyList.foldBack2 folder list1 list2 state
Parameters:
'T1 -> 'T2 -> 'State -> 'State
-
The function to update the state given the input elements.
list1 : NonEmptyList<'T1>
-
The first input list.
list2 : NonEmptyList<'T2>
-
The second input list.
state : 'State
-
The initial state.
Returns: 'State
The final state value.
Modifiers: inline Type parameters: 'T1, 'T2, 'State |
|
||
Full Usage:
NonEmptyList.forall predicate list
Parameters:
'T -> bool
-
The function to test the input elements.
list : NonEmptyList<'T>
-
The input list.
Returns: bool
True if all of the elements satisfy the predicate.
Modifiers: inline Type parameters: 'T |
|
||
Full Usage:
NonEmptyList.forall2 predicate list1 list2
Parameters:
'T1 -> 'T2 -> bool
-
The function to test the input elements.
list1 : NonEmptyList<'T1>
-
The first input list.
list2 : NonEmptyList<'T2>
-
The second input list.
Returns: bool
True if all of the pairs of elements satisfy the predicate.
Modifiers: inline Type parameters: 'T1, 'T2 |
|
||
Full Usage:
NonEmptyList.gather f source
Parameters:
'T -> ^ZipFunctor<'U>
source : NonEmptyList<'T>
Returns: ^e
Modifiers: inline Type parameters: 'T, ^ZipFunctor<'U>, ^a, ^b, 'c, 'd, ^e, 'f |
|||
Full Usage:
NonEmptyList.groupBy projection list
Parameters:
'T -> 'U
-
A function that transforms an element of the list into a comparable key.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'U * NonEmptyList<'T>>
The result list.
Modifiers: inline Type parameters: 'T, 'U |
|
||
|
|||
Full Usage:
NonEmptyList.indexed list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<int * 'T>
The result list.
|
|||
Full Usage:
NonEmptyList.init count initializer
Parameters:
int
-
The number of elements to initialize.
initializer : int -> 'T
-
A function that produces an element from an index.
Returns: NonEmptyList<'T>
The result list.
|
|
||
Full Usage:
NonEmptyList.insertAt index value list
Parameters:
int
-
The index at which to insert the element.
value : 'T
-
The value to insert.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The result list.
|
|
||
Full Usage:
NonEmptyList.insertManyAt index values list
Parameters:
int
-
The index at which to insert the elements.
values : 'T seq
-
The values to insert.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The result list.
|
|
||
Full Usage:
NonEmptyList.item index list
Parameters:
int
-
The index of the element to retrieve.
list : NonEmptyList<'T>
-
The input list.
Returns: 'T
The element at the specified index.
|
|
||
Full Usage:
NonEmptyList.iter action list
Parameters:
'T -> unit
-
The function to apply to each element.
list : NonEmptyList<'T>
-
The input list.
|
|
||
Full Usage:
NonEmptyList.iter2 action list1 list2
Parameters:
'T1 -> 'T2 -> unit
-
The function to apply to each pair of elements.
list1 : NonEmptyList<'T1>
-
The first input list.
list2 : NonEmptyList<'T2>
-
The second input list.
|
|
||
Full Usage:
NonEmptyList.iteri action list
Parameters:
int -> 'T -> unit
-
The function to apply to each element and its index.
list : NonEmptyList<'T>
-
The input list.
|
|
||
Full Usage:
NonEmptyList.iteri2 action list1 list2
Parameters:
int -> 'T1 -> 'T2 -> unit
-
The function to apply to each pair of elements and their index.
list1 : NonEmptyList<'T1>
-
The first input list.
list2 : NonEmptyList<'T2>
-
The second input list.
|
|
||
Full Usage:
NonEmptyList.last list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: 'T
The last element of the list.
|
|||
|
|||
Full Usage:
NonEmptyList.map f arg2
Parameters:
'a -> 'b
arg1 : NonEmptyList<'a>
Returns: NonEmptyList<'b>
|
|||
Full Usage:
NonEmptyList.map2 mapping list1 list2
Parameters:
'T1 -> 'T2 -> 'U
-
The function to apply to each pair of elements.
list1 : NonEmptyList<'T1>
-
The first input list.
list2 : NonEmptyList<'T2>
-
The second input list.
Returns: NonEmptyList<'U>
The result list.
|
|
||
Full Usage:
NonEmptyList.map2Shortest f l1 l2
Parameters:
'a -> 'b -> 'c
l1 : NonEmptyList<'a>
l2 : NonEmptyList<'b>
Returns: NonEmptyList<'c>
|
|||
Full Usage:
NonEmptyList.map3 mapping list1 list2 list3
Parameters:
'T1 -> 'T2 -> 'T3 -> 'U
-
The function to apply to each triplet of elements.
list1 : NonEmptyList<'T1>
-
The first input list.
list2 : NonEmptyList<'T2>
-
The second input list.
list3 : NonEmptyList<'T3>
-
The third input list.
Returns: NonEmptyList<'U>
The result list.
|
|
||
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.mapFold mapping state list
Parameters:
'State -> 'T -> 'Result * 'State
-
The function to apply to each element and the accumulator.
state : 'State
-
The initial state.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'Result> * 'State
The result list and the final state.
|
|
||
Full Usage:
NonEmptyList.mapFoldBack mapping list state
Parameters:
'T -> 'State -> 'Result * 'State
-
The function to apply to each element and the accumulator.
list : NonEmptyList<'T>
-
The input list.
state : 'State
-
The initial state.
Returns: NonEmptyList<'Result> * 'State
The result list and the final state.
|
|
||
Full Usage:
NonEmptyList.mapi f arg2
Parameters:
int -> 'a -> 'b
arg1 : NonEmptyList<'a>
Returns: NonEmptyList<'b>
|
|||
Full Usage:
NonEmptyList.mapi2 mapping list1 list2
Parameters:
int -> 'T1 -> 'T2 -> 'U
-
The function to apply to each pair of elements and their index.
list1 : NonEmptyList<'T1>
-
The first input list.
list2 : NonEmptyList<'T2>
-
The second input list.
Returns: NonEmptyList<'U>
The result list.
|
|
||
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:
'a list
-
The input list.
Returns: NonEmptyList<'a>
Non empty list containing the elements of the list.
|
Throws exception for empty list
|
||
|
|
||
Full Usage:
NonEmptyList.ofSeq seq
Parameters:
'a seq
-
The input list.
Returns: NonEmptyList<'a>
Non empty list containing the elements of the list.
|
Throws exception for empty list
|
||
Full Usage:
NonEmptyList.pairwise list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T * 'T>
The result list.
|
|||
Full Usage:
NonEmptyList.partition predicate list
Parameters:
'T -> bool
-
A function to test each element of the list.
list : NonEmptyList<'T>
-
The input list.
Returns: 'T list * 'T list
A tuple containing the two lists.
|
|
||
Full Usage:
NonEmptyList.permute permutation list
Parameters:
int -> int
-
A function to generate a permutation of the list indices.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The result list.
|
|
||
Full Usage:
NonEmptyList.pick chooser list
Parameters:
'T -> 'U option
-
A function to transform elements of the list into options.
list : NonEmptyList<'T>
-
The input list.
Returns: 'U
The first chosen element.
|
|
||
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.removeAt index list
Parameters:
int
-
The index of the element to remove.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The resulting list.
|
|
||
Full Usage:
NonEmptyList.removeManyAt index count list
Parameters:
int
-
The index at which to start removing elements.
count : int
-
The number of elements to remove.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The result list.
|
|
||
Full Usage:
NonEmptyList.replicate count value
Parameters:
int
-
The number of elements.
value : 'T
-
The value to replicate.
Returns: NonEmptyList<'T>
The result list.
|
|
||
Full Usage:
NonEmptyList.rev list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The reversed list.
|
|||
Full Usage:
NonEmptyList.scan folder state list
Parameters:
'State -> 'T -> 'State
-
A function that updates the state with each element.
state : 'State
-
The initial state.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'State>
The list of state values.
|
|
||
Full Usage:
NonEmptyList.scanBack folder list state
Parameters:
'T -> 'State -> 'State
-
A function that updates the state with each element.
list : NonEmptyList<'T>
-
The input list.
state : 'State
-
The initial state.
Returns: NonEmptyList<'State>
The list of state values.
|
|
||
Full Usage:
NonEmptyList.sequence source
Parameters:
NonEmptyList<^Functor<'T>>
Returns: ^Functor
Modifiers: inline Type parameters: ^Functor<'T>, ^a, 'b, ^c, 'd, ^Functor<NonEmptyList<'T>>, 'e |
|||
|
|||
Full Usage:
NonEmptyList.skip count list
Parameters:
int
-
The number of elements to skip.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The result list.
|
|
||
Full Usage:
NonEmptyList.skipWhile predicate list
Parameters:
'T -> bool
-
A function to test each element of the list.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The result list.
|
|
||
Full Usage:
NonEmptyList.sort list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The sorted list.
|
|||
Full Usage:
NonEmptyList.sortBy projection list
Parameters:
'T -> 'Key
-
A function to transform the list elements before comparison.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The sorted list.
|
|
||
Full Usage:
NonEmptyList.sortByDescending projection list
Parameters:
'T -> 'Key
-
A function to transform the list elements before comparison.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The sorted list.
|
|
||
Full Usage:
NonEmptyList.sortDescending list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The sorted list.
|
|||
Full Usage:
NonEmptyList.sortWith comparer list
Parameters:
'T -> 'T -> int
-
A function to compare pairs of elements.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The sorted list.
|
|
||
Full Usage:
NonEmptyList.splitAt index list
Parameters:
int
-
The index at which to split the list.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T> * NonEmptyList<'T>
A tuple containing the two lists.
|
|
||
Full Usage:
NonEmptyList.splitInto count list
Parameters:
int
-
The number of lists to create.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<NonEmptyList<'T>>
A list of lists.
|
|
||
Full Usage:
NonEmptyList.sum list
Parameters:
^a seq
-
The input list.
Returns: ^a
The sum of the elements.
Modifiers: inline Type parameters: ^a |
|||
Full Usage:
NonEmptyList.sumBy projection list
Parameters:
'a -> ^b
-
A function to transform the list elements before summing.
list : 'a seq
-
The input list.
Returns: ^b
The sum of the transformed elements.
Modifiers: inline Type parameters: 'a, ^b |
|||
|
Throws exception for empty tail
|
||
Full Usage:
NonEmptyList.tails s
Parameters:
NonEmptyList<'a>
Returns: NonEmptyList<NonEmptyList<'a>>
|
|
||
Full Usage:
NonEmptyList.take count list
Parameters:
int
-
The number of elements to take.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The result list.
|
|
||
Full Usage:
NonEmptyList.takeWhile predicate list
Parameters:
'T -> bool
-
A function to test each element of the list.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The result list.
|
|
||
|
|||
|
|||
Full Usage:
NonEmptyList.toNonEmptySeq list
Parameters:
NonEmptyList<'a>
Returns: NonEmptySeq<'a>
|
|
||
|
|||
Full Usage:
NonEmptyList.transpose source
Parameters:
NonEmptyList<^ZipFunctor<'T>>
Returns: ^Functor
Modifiers: inline Type parameters: ^ZipFunctor<'T>, ^a, 'b, ^c, 'd, ^Functor<NonEmptyList<'T>>, 'e |
|||
Full Usage:
NonEmptyList.traverse f source
Parameters:
'T -> ^Functor<'U>
source : NonEmptyList<'T>
Returns: ^Functor
Modifiers: inline Type parameters: 'T, ^Functor<'U>, ^a, 'b, ^Functor<'List<'U>>, 'c, ^Functor<NonEmptyList<'U>>, 'd |
|||
Full Usage:
NonEmptyList.truncate count list
Parameters:
int
-
The maximum number of elements to include in the list.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The truncated list.
|
|
||
Full Usage:
NonEmptyList.tryChoose chooser list
Parameters:
'T -> 'a option
-
The function to be applied to the list elements.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'a> option
The resulting list comprising the values v where the chooser function returned Some(x).
Modifiers: inline Type parameters: 'T, 'a |
|
||
Full Usage:
NonEmptyList.tryCollect mapping list
Parameters:
'T -> 'a
-
The function to transform each input element into a sublist to be concatenated.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'b> option
The concatenation of the transformed sublists.
Modifiers: inline Type parameters: 'T, 'a, 'b |
|
||
Full Usage:
NonEmptyList.tryConcat lists
Parameters:
NonEmptyList<'a>
-
The input list of lists.
Returns: NonEmptyList<'T> option
The resulting concatenated list or None.
Modifiers: inline Type parameters: 'a, 'T |
|
||
Full Usage:
NonEmptyList.tryExactlyOne list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: 'T option
The only element of the list, or None.
|
|||
Full Usage:
NonEmptyList.tryFilter predicate list
Parameters:
'T -> bool
-
The function to test the input elements.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T> option
A list containing only the elements that satisfy the predicate.
Modifiers: inline Type parameters: 'T |
|
||
Full Usage:
NonEmptyList.tryFind predicate list
Parameters:
'T -> bool
-
A function to test each element of the list.
list : NonEmptyList<'T>
-
The input list.
Returns: 'T option
The first element for which the predicate returns true, or None.
|
|
||
Full Usage:
NonEmptyList.tryFindBack predicate list
Parameters:
'T -> bool
-
A function to test each element of the list.
list : NonEmptyList<'T>
-
The input list.
Returns: 'T option
The last element for which the predicate returns true, or None.
|
|
||
Full Usage:
NonEmptyList.tryFindIndex predicate list
Parameters:
'T -> bool
-
A function to test each element of the list.
list : NonEmptyList<'T>
-
The input list.
Returns: int option
The index of the first element for which the predicate returns true, or None.
|
|
||
Full Usage:
NonEmptyList.tryFindIndexBack predicate list
Parameters:
'T -> bool
-
A function to test each element of the list.
list : NonEmptyList<'T>
-
The input list.
Returns: int option
The index of the last element for which the predicate returns true, or None.
|
|
||
Full Usage:
NonEmptyList.tryItem index list
Parameters:
int
-
The index of the element to retrieve.
list : NonEmptyList<'T>
-
The input list.
Returns: 'T option
The element at the specified index, or None.
|
|
||
Full Usage:
NonEmptyList.tryLast list
Parameters:
NonEmptyList<'T>
-
The input list.
Returns: 'T option
The last element of the list, or None.
|
|||
Full Usage:
NonEmptyList.tryOfArray array
Parameters:
'a array
-
The input array.
Returns: NonEmptyList<'a> option
Non empty list containing the elements of the array. Returns None if no the input list is empty.
|
|
||
Full Usage:
NonEmptyList.tryOfList list
Parameters:
'a list
-
The input list.
Returns: NonEmptyList<'a> option
Non empty list containing the elements of the list. Returns None if no the input list is empty.
|
|
||
Full Usage:
NonEmptyList.tryOfSeq seq
Parameters:
'a seq
-
The input list.
Returns: NonEmptyList<'a> option
Non empty list containing the elements of the list. Returns None if no the input list is empty.
|
|
||
Full Usage:
NonEmptyList.tryPick chooser list
Parameters:
'T -> 'U option
-
A function to transform elements of the list into options.
list : NonEmptyList<'T>
-
The input list.
Returns: 'U option
The first chosen element, or None.
|
|
||
Full Usage:
NonEmptyList.tryRemoveAt index list
Parameters:
int
-
The index of the element to remove.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T> option
The resulting list.
|
|
||
Full Usage:
NonEmptyList.tryRemoveManyAt index count list
Parameters:
int
-
The index at which to start removing elements.
count : int
-
The number of elements to remove.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T> option
The result list.
|
|
||
Full Usage:
NonEmptyList.trySkip count list
Parameters:
int
-
The number of elements to skip.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T> option
The result list.
|
|
||
Full Usage:
NonEmptyList.trySkipWhile predicate list
Parameters:
'T -> bool
-
A function to test each element of the list.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T> option
The result list.
|
|
||
Full Usage:
NonEmptyList.tryTail arg1
Parameters:
NonEmptyList<'a>
Returns: NonEmptyList<'a> option
|
|||
Full Usage:
NonEmptyList.tryTake count list
Parameters:
int
-
The number of elements to take.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T> option
The result list.
|
|
||
Full Usage:
NonEmptyList.tryTakeWhile predicate list
Parameters:
'T -> bool
-
A function to test each element of the list.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T> option
The result list.
|
|
||
Full Usage:
NonEmptyList.tryTruncate count list
Parameters:
int
-
The maximum number of elements to include in the list.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T> option
The truncated list.
|
|
||
Full Usage:
NonEmptyList.uncons list
Parameters:
NonEmptyList<'a>
-
The input list.
Returns: 'a * NonEmptyList<'a>
A tuple with the head and the tail of the original list.
|
|
||
Full Usage:
NonEmptyList.unconsAsList list
Parameters:
NonEmptyList<'a>
-
The input (non empty) list.
Returns: 'a * 'a list
A tuple with the head and the tail of the original list.
|
|
||
Full Usage:
NonEmptyList.unfold generator state
Parameters:
'State -> ('T * 'State) option
-
A function that takes the current state and returns an option tuple of the next element and the next state.
state : 'State
-
The initial state.
Returns: NonEmptyList<'T>
The result list.
|
|
||
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.unzip3 list
Parameters:
NonEmptyList<'T1 * 'T2 * 'T3>
-
The input list.
Returns: NonEmptyList<'T1> * NonEmptyList<'T2> * NonEmptyList<'T3>
A tuple containing the three lists.
|
|
||
Full Usage:
NonEmptyList.updateAt index value list
Parameters:
int
-
The index of the element to update.
value : 'T
-
The new value.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The result list.
|
|
||
Full Usage:
NonEmptyList.where predicate list
Parameters:
'T -> bool
-
A function to test each element of the list.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<'T>
The result list.
|
|
||
Full Usage:
NonEmptyList.windowed windowSize list
Parameters:
int
-
The number of elements in each window.
list : NonEmptyList<'T>
-
The input list.
Returns: NonEmptyList<NonEmptyList<'T>>
The list of windows.
|
|
||
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.zip3 list1 list2 list3
Parameters:
NonEmptyList<'T1>
-
The first input list.
list2 : NonEmptyList<'T2>
-
The second input list.
list3 : NonEmptyList<'T3>
-
The third input list.
Returns: NonEmptyList<'T1 * 'T2 * 'T3>
The list of triples.
|
|
||
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.
|
|