Created
October 12, 2020 12:28
-
-
Save ch8n/69d60474085e290e50120f93bed1bef8 to your computer and use it in GitHub Desktop.
entries to Pair
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// enteries to map example | |
val entries:Set<Entry<String, Int>> = setOf(entry) | |
val map = entries.map { entry -> entry.toPair() }.toMap() | |
// here, entries.map { entry -> entry.toPair() } | |
// is List<Pair<String,Int>> i.e Iterable<Pair<K, V>>.toMap() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment