title: How to convert List to Map in Kotlin?
body: <p>For example I have a list of strings like:</p>
  
  <pre><code>val list = listOf("a", "b", "c", "d")
  </code></pre>
  
  <p>and I want to convert it to a map, where the strings are the keys.</p>
  
  <p>I know I should use the <code>.toMap()</code> function, but I don't know how, and I haven't seen any examples of it.</p>