ResizeArr Module
An internal module with functions for working with ResizeArray<'T>.
Functions and values
| Function or value |
Description
|
Full Usage:
clear arr
Parameters:
ResizeArray<'T>
Modifiers: inline Type parameters: 'T |
this is more efficient than ResizeArray.Clear() in Fable, which emits .splice(0)
|
Full Usage:
clone resizeArray
Parameters:
ResizeArray<'T>
Returns: ResizeArray<'T>
Modifiers: inline Type parameters: 'T |
returns a clone of the ResizeArray, but optimized in Fable
|
Full Usage:
closeLoop pts
Parameters:
ResizeArray<'T>
Returns: ResizeArray<'T>
Type parameters: '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
Type parameters: '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 .
Type parameters: 'T |
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
Type parameters: 'T |
|
Full Usage:
findLastIndex predicate xs
Parameters:
'T -> bool
xs : ResizeArray<'T>
Returns: int
Type parameters: 'T |
|
Full Usage:
iPrevThisNext xs
Parameters:
ResizeArray<'T>
Returns: (int * 'T * 'T * 'T) seq
Type parameters: 'T |
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 |
DO NOT USE with numbers, they are Float64Arrays in Fable .
|
Full Usage:
lastIdx resizeArray
Parameters:
ResizeArray<'T>
Returns: int
Modifiers: inline Type parameters: 'T |
returns resizeArray.Count - 1 , but optimized in Fable
|
Full Usage:
len resizeArray
Parameters:
ResizeArray<'T>
Returns: int
Modifiers: inline Type parameters: 'T |
returns resizeArray.Count , but optimized in Fable
|
Full Usage:
map mapping resizeArray
Parameters:
'T -> 'U
resizeArray : ResizeArray<'T>
Returns: ResizeArray<'U>
Modifiers: inline Type parameters: 'T, 'U |
|
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.
Type parameters: 'T, 'Key (requires comparison) |
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.
Type parameters: 'T, 'Key (requires comparison) |
Returns the index of the smallest of all elements of the ResizeArray, compared via Operators.max on the function result.
|
Full Usage:
pop arr
Parameters:
ResizeArray<'T>
Returns: 'T
Modifiers: inline Type parameters: 'T |
|
Full Usage:
popOff arr
Parameters:
ResizeArray<'T>
Modifiers: inline Type parameters: 'T |
|
Full Usage:
rev xs
Parameters:
ResizeArray<'T>
-
The input ResizeArr.
Returns: ResizeArray<'T>
The reversed ResizeArr.
Type parameters: 'T |
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.
Type parameters: 'T, 'Key (requires comparison) |
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
Type parameters: 'T |
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.
Type parameters: 'T |
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.
Type parameters: 'T |
Returns the index of the first element in the ResizeArray that satisfies the given predicate.
|
Euclid