Additional operations on ResizeArray
Function or value | Description | ||
Full Usage:
ResizeArray.apply f x
Parameters:
ResizeArray<('T -> 'U)>
-
The functions.
x : ResizeArray<'T>
-
The values.
Returns: ResizeArray<'U>
A concatenated list of the resulting ResizeArray after applying each function to each value.
|
Example
Multiple items
module List from Microsoft.FSharp.Collections -------------------- type List<'T> = | op_Nil | op_ColonColon of Head: 'T * Tail: 'T list interface IReadOnlyList<'T> interface IReadOnlyCollection<'T> interface IEnumerable interface IEnumerable<'T> member GetReverseIndex: rank: int * offset: int -> int member GetSlice: startIndex: int option * endIndex: int option -> 'T list static member Cons: head: 'T * tail: 'T list -> 'T list member Head: 'T member IsEmpty: bool member Item: index: int -> 'T with get ... Multiple items
val double: value: 'T -> double (requires member op_Explicit) -------------------- type double = System.Double -------------------- type double<'Measure> = float<'Measure> Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int type 'T list = List<'T>
|
||
Full Usage:
ResizeArray.findSliceIndex slice source
Parameters:
'a[]
source : 'a[]
Returns: int
The index of the slice.
|
|
||
Full Usage:
ResizeArray.intercalate separator source
Parameters:
'a[]
source : seq<'a[]>
Returns: 'a[]
|
|
||
Full Usage:
ResizeArray.intersperse element source
Parameters:
'T
source : 'T[]
Returns: 'T[]
|
|
||
Full Usage:
ResizeArray.lift2 mapping x1 x2
Parameters:
'T -> 'U -> 'c
x1 : ResizeArray<'T>
x2 : ResizeArray<'U>
Returns: ResizeArray<'c>
|
Combines all values from the first ResizeArray with the second, using the supplied mapping function.
|
||
Full Usage:
ResizeArray.lift3 mapping x1 x2 x3
Parameters:
'U -> 'V -> 'T -> 'd
-
Mapping function taking three element combination as input.
x1 : ResizeArray<'T>
-
First ResizeArray.
x2 : ResizeArray<'U>
-
Second ResizeArray.
x3 : ResizeArray<'V>
-
Third ResizeArray.
Returns: ResizeArray<'d>
ResizeArray with values returned from mapping function.
|
|
||
Full Usage:
ResizeArray.map mapping source
Parameters:
'T -> 'U
-
A function to transform items from the input ResizeArray.
source : ResizeArray<'T>
-
The input ResizeArray.
Returns: ResizeArray<'U>
The result ResizeArray.
|
Builds a new ResizeArray whose elements are the results of applying the given function to each of the elements of the ResizeArray.
|
||
Full Usage:
ResizeArray.map2Shortest f a1 a2
Parameters:
'a -> 'b -> 'c
a1 : ResizeArray<'a>
a2 : ResizeArray<'b>
Returns: ResizeArray<'c>
|
Safely build a new ResizeArray whose elements are the results of applying the given function to each of the elements of the two ResizeArrays pairwise.
|
||
Full Usage:
ResizeArray.partitionMap mapper source
Parameters:
'T -> Choice<'T1, 'T2>
source : 'T array
Returns: 'T1[] * 'T2[]
A tuple with both resulting arrays.
|
Creates two arrays by applying the mapper function to each element in the array and classifying the transformed values depending on whether they were wrapped with Choice1Of2 or Choice2Of2.
|
||
Full Usage:
ResizeArray.replace oldValue newValue source
Parameters:
'T[]
newValue : 'T[]
source : 'T[]
Returns: 'T[]
|
|
||
Full Usage:
ResizeArray.split separators source
Parameters:
seq<'a[]>
source : 'a[]
Returns: seq<'a[]>
|
|
||
Full Usage:
ResizeArray.tryFindSliceIndex slice source
Parameters:
'a[]
source : 'a[]
Returns: int option
The index of the slice or None .
|
Returns the index of the first occurrence of the specified slice in the source.
Returns
|
||
Full Usage:
ResizeArray.zipShortest a1 a2
Parameters:
ResizeArray<'T1>
-
First input ResizeArray.
a2 : ResizeArray<'T2>
-
Second input ResizeArray.
Returns: ResizeArray<'T1 * 'T2>
ResizeArray with corresponding pairs of input ResizeArrays.
|
Zip safely two ResizeArrays. If one ResizeArray is shorter, excess elements are discarded from the right end of the longer ResizeArray.
|