Additional operations on Array
Function or value | Description | ||
Full Usage:
Array.apply f x
Parameters:
('a -> 'b)[]
-
The array of functions.
x : 'a[]
-
The array of values.
Returns: 'b[]
A concatenated array of the resulting arrays from applying each function to each value
|
Example
|
||
Full Usage:
Array.choosei mapping source
Parameters:
int -> 'b -> 'c option
-
The mapping function, taking index and element as parameters.
source : 'b[]
-
The input array.
Returns: 'c[]
Array with values x for each Array value where the function returns Some(x).
|
|
||
Full Usage:
Array.findSliceIndex slice source
Parameters:
'b[]
source : 'b[]
Returns: int
The index of the slice.
The index of the slice or None .
|
![]() ![]() ![]() ![]() ![]() ![]() Returns the index of the first occurrence of the specified slice in the source. Returns the index of the first occurrence of the specified slice in the source. Note: this is unsafe and will throw ArgumentException when the specified slice is not found.
|
||
Full Usage:
Array.intercalate separator source
Parameters:
'a[]
source : seq<'a[]>
Returns: 'a[]
|
|
||
Full Usage:
Array.intersperse element source
Parameters:
'T
source : 'T[]
Returns: 'T[]
|
|
||
Full Usage:
Array.lift2 f x y
Parameters:
'd -> 'e -> 'f
x : 'd[]
y : 'e[]
Returns: 'f[]
|
|
||
Full Usage:
Array.lift3 mapping list1 list2 list3
Parameters:
'e -> 'f -> 'g -> 'h
-
Mapping function taking three element combination as input.
list1 : 'e[]
-
First array.
list2 : 'f[]
-
Second array.
list3 : 'g[]
-
Third array.
Returns: 'h[]
Array with values returned from mapping function.
|
|
||
Full Usage:
Array.map2Shortest f a1 a2
Parameters:
'T -> 'U -> 'a
a1 : 'T[]
a2 : 'U[]
Returns: 'a[]
|
![]() ![]() ![]() ![]() ![]() ![]() Safely build a new array whose elements are the results of applying the given function to each of the elements of the two arrays pairwise.
|
||
Full Usage:
Array.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 classifies the transformed values depending on whether they were wrapped with Choice1Of2 or Choice2Of2.
|
||
Full Usage:
Array.replace oldValue newValue source
Parameters:
'T[]
newValue : 'T[]
source : 'T[]
Returns: 'T[]
|
|
||
Full Usage:
Array.split separators source
Parameters:
seq<'a[]>
source : 'a[]
Returns: seq<'a[]>
|
|
||
Full Usage:
Array.tryFindSliceIndex slice source
Parameters:
'b[]
source : 'b[]
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:
Array.zipShortest a1 a2
Parameters:
'T1 array
-
First input array.
a2 : 'T2 array
-
Second input array.
Returns: ('T1 * 'T2)[]
Array with corresponding pairs of input arrays.
|
![]() ![]() ![]() ![]() ![]() ![]() Zip safely two arrays. If one array is shorter, excess elements are discarded from the right end of the longer array.
|