Is there a stdlib function that creates a map from...
# announcements
h
Is there a stdlib function that creates a map from two collections (one keys, one values)? The following code accomplishes this, but creates an extra interim list of pairs
Copy code
a.zip(b).toMap()
I accomplished this in my particular use-case involving enums, but that's because I have access to the ordinal
Copy code
MyEnumClass.values().associate { it to myList[it.ordinal] }