Kotlin HashSet associate()
Syntax & Examples
Syntax of HashSet.associate()
The syntax of HashSet.associate() extension function is:
fun <T, K, V> Iterable<T>.associate( transform: (T) -> Pair<K, V> ): Map<K, V>
This associate() extension function of HashSet returns a Map containing key-value pairs provided by transform function applied to elements of the given collection.