For example I have a list of strings like:

val list = listOf("a", "b", "c", "d")

and I want to convert it to a map, where the strings are the keys.

I know I should use the .toMap() function, but I don’t know how, and I haven’t seen any examples of it.

6 Answers
6

Leave a Reply

Your email address will not be published. Required fields are marked *