Kotlin HashMap flatMap()
Syntax & Examples


Syntax of HashMap.flatMap()

The syntax of HashMap.flatMap() extension function is:

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

This flatMap() extension function of HashMap returns a single list of all elements yielded from results of transform function being invoked on each entry of original map.