Märkus
Juurdepääs sellele lehele nõuab autoriseerimist. Võite proovida sisse logida või kausta vahetada.
Juurdepääs sellele lehele nõuab autoriseerimist. Võite proovida kausta vahetada.
Fully qualified name: Std.Arrays.FlatMapped
function FlatMapped<'TInput, 'TOutput>(mapper : ('TInput -> 'TOutput[]), array : 'TInput[]) : 'TOutput[]
Given an array and a function that maps an array element to some output array, returns the concatenated output arrays for each array element.
The type of array
elements.
The mapper
function returns arrays of this type.
A function from 'TInput
to 'TOutput[]
that is used to map array elements.
An array of elements.
An array of 'TOutput[]
which is the concatenation of all arrays generated by
the mapping function.
The following code creates an array with each element of the input array repeated twice.
let repeatedPairs = FlatMapped(x -> Repeated(x, 2), [1, 2, 3]);
// repeatedPairs is [1, 1, 2, 2, 3, 3].