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

flatMap

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

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

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> Attribute<Sequence<T>>.flatMap(transform: (T) -> Sequence<R>): Attribute<Sequence<R>>

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

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> Attribute<String>.flatMap(transform: (Char) -> Iterable<R>): Attribute<List<R>>

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

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