Documentation / dataflow / com.femastudios.dataflow.extensions / flatMap
Go to reference

flatMap

fun <T, R> Field<Iterable<T>>.flatMap(transform: (T) -> Iterable<R>): Field<List<R>>
fun <K, V, R> Field<Map<K, V>>.flatMap(transform: (Entry<K, V>) -> Iterable<R>): Field<List<R>>

Same as flatMap, but accepts Field and returns a new Field.

Calling this function is equivalent to use transform and calling flatMap in the transformation function.

This is simply a convenience function.

See Also

kotlin.collections.flatMap


fun <T, R> Field<Sequence<T>>.flatMap(transform: (T) -> Sequence<R>): Field<Sequence<R>>

Same as flatMap, but accepts Field and returns a new Field.

Calling this function is equivalent to use transform and calling flatMap in the transformation function.

This is simply a convenience function.

See Also

kotlin.sequences.flatMap


fun <R> Field<String>.flatMap(transform: (Char) -> Iterable<R>): Field<List<R>>

Same as flatMap, but accepts Field and returns a new Field.

Calling this function is equivalent to use transform and calling flatMap in the transformation function.

This is simply a convenience function.

See Also

kotlin.text.flatMap