Kotlin HashMap flatMapTo()
Syntax & Examples
Syntax of HashMap.flatMapTo()
The syntax of HashMap.flatMapTo() extension function is:
fun <K, V, R, C : MutableCollection<in R>> Map<out K, V>.flatMapTo( destination: C, transform: (Entry<K, V>) -> Iterable<R> ): C
This flatMapTo() extension function of HashMap appends all elements yielded from results of transform function being invoked on each entry of original map, to the given destination.