flatMap

@JvmName(name = "flatMapList")
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> List<Int>): IntList(source)
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> IntList): IntList(source)

Returns a single IntList of all elements yielded from results of transform function being invoked on each element of original collection.

Parameters

computeSize

whether to precompute the size of the resulting list

transform

the function to transform an element to a list of elements


@JvmName(name = "flatMapList")
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> List<Long>): LongList(source)
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> LongList): LongList(source)

Returns a single LongList of all elements yielded from results of transform function being invoked on each element of original collection.

Parameters

computeSize

whether to precompute the size of the resulting list

transform

the function to transform an element to a list of elements


@JvmName(name = "flatMapList")
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> List<Float>): FloatList(source)
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> FloatList): FloatList(source)

Returns a single FloatList of all elements yielded from results of transform function being invoked on each element of original collection.

Parameters

computeSize

whether to precompute the size of the resulting list

transform

the function to transform an element to a list of elements


@JvmName(name = "flatMapList")
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> List<Double>): DoubleList(source)
inline fun <T> List<T>.flatMap(computeSize: Boolean = false, transform: (T) -> DoubleList): DoubleList(source)

Returns a single DoubleList of all elements yielded from results of transform function being invoked on each element of original collection.

Parameters

computeSize

whether to precompute the size of the resulting list

transform

the function to transform an element to a list of elements