Kotlin HashMap asSequence()
Syntax & Examples


Syntax of HashMap.asSequence()

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

fun <K, V> Map<out K, V>.asSequence(): Sequence<Entry<K, V>>

This asSequence() extension function of HashMap creates a Sequence instance that wraps the original map returning its entries when being iterated.