ResizeArr Module
An internal module with functions for working with ResizeArray<'T>.
Functions and values
| Function or value |
Description
|
Full Usage:
closeLoop pts
Parameters:
ResizeArray<'T>
Returns: ResizeArray<'T>
|
Creates a shallow copy of the input ResizeArray and adds the first element to the end, closing the loop.
|
Full Usage:
find predicate xs
Parameters:
'T -> bool
xs : ResizeArray<'T>
Returns: 'T
|
|
Full Usage:
findIndex predicate xs
Parameters:
'T -> bool
-
The function to test the input elements.
xs : ResizeArray<'T>
-
The input ResizeArr.
Returns: int
The index of the first element that satisfies the predicate, or -1 .
|
Returns the index of the first element in the ResizeArray that satisfies the given predicate.
|
Full Usage:
findLast predicate xs
Parameters:
'T -> bool
xs : ResizeArray<'T>
Returns: 'T
|
|
Full Usage:
findLastIndex predicate xs
Parameters:
'T -> bool
xs : ResizeArray<'T>
Returns: int
|
|
Full Usage:
iPrevThisNext xs
Parameters:
ResizeArray<'T>
Returns: (int * 'T * 'T * 'T) seq
|
Yields looped Seq from (1, last, first, second) up to (lastIndex, second-last, last, first) The resulting seq has the same element count as the input Rarr.
|
Full Usage:
init count f
Parameters:
int
f : int -> 'T
Returns: ResizeArray<'T>
Modifiers: inline Type parameters: 'T |
|
Full Usage:
length xs
Parameters:
ResizeArray<'T>
Returns: int
Modifiers: inline Type parameters: 'T |
this.Count.
|
Full Usage:
map mapping xs
Parameters:
'T -> 'U
-
The function to transform elements of the ResizeArr.
xs : ResizeArray<'T>
-
The input ResizeArr.
Returns: ResizeArray<'U>
The ResizeArray of transformed elements.
|
Builds a new ResizeArray whose elements are the results of applying the given function to each of the elements of the ResizeArr.
|
Full Usage:
maxIndexBy projection xs
Parameters:
'T -> 'Key
-
The function to transform the elements into a type supporting comparison.
xs : ResizeArray<'T>
-
The input ResizeArr.
Returns: int
The index of the maximum element.
|
Returns the index of the greatest of all elements of the ResizeArray, compared via Operators.max on the function result.
|
Full Usage:
minIndexBy projection xs
Parameters:
'T -> 'Key
-
The function to transform the elements into a type supporting comparison.
xs : ResizeArray<'T>
-
The input ResizeArr.
Returns: int
The index of the smallest element.
|
Returns the index of the smallest of all elements of the ResizeArray, compared via Operators.max on the function result.
|
Full Usage:
rev xs
Parameters:
ResizeArray<'T>
-
The input ResizeArr.
Returns: ResizeArray<'T>
The reversed ResizeArr.
|
Returns a new ResizeArray with the elements in reverse order.
|
Full Usage:
singleton x
Parameters:
'T
Returns: ResizeArray<'T>
Modifiers: inline Type parameters: 'T |
|
Full Usage:
sortBy projection xs
Parameters:
'T -> 'Key
-
The function to transform ResizeArray elements into the type that is compared.
xs : ResizeArray<'T>
-
The input ResizeArr.
Returns: ResizeArray<'T>
The sorted ResizeArr.
|
Sorts the elements of a ResizeArray, using the given projection for the keys and returning a new ResizeArr. Elements are compared using Operators.compare. This means "Z" is before "a". This is different from Collections.Generic.List.Sort() where "a" is before "Z" using IComparable interface. This is NOT a stable sort, i.e. the original order of equal elements is not necessarily preserved. For a stable sort, consider using Seq.sort.
|
Full Usage:
thisNext rarr
Parameters:
ResizeArray<'T>
Returns: ('T * 'T) seq
|
Yields looped Seq from (first, second) up to (last, first). The resulting seq has the same element count as the input Rarr.
|
Full Usage:
tryFindBack predicate resizeArray
Parameters:
'T -> bool
-
The function to test the input elements.
resizeArray : ResizeArray<'T>
-
The input ResizeArray.
Returns: 'T option
The last element that satisfies the predicate, or None.
|
Returns the last element for which the given function returns
|
Full Usage:
tryFindIndex predicate xs
Parameters:
'T -> bool
-
The function to test the input elements.
xs : ResizeArray<'T>
-
The input ResizeArr.
Returns: int option
The index of the first element that satisfies the predicate, or None.
|
Returns the index of the first element in the ResizeArray that satisfies the given predicate.
|
Euclid