title: Android Kotlin: map or other equivalent of converting a List to a List of Pairs?
body: <p>Suppose I have this:</p>
  <pre><code>listOf(&quot;ball&quot;,&quot;apple&quot;,&quot;zebra&quot;,&quot;cat&quot;)
  </code></pre>
  <p>I want to convert this to:</p>
  <pre><code>listOf(Pair(&quot;ball&quot;,&quot;b&quot;),Pair(&quot;apple&quot;,&quot;a&quot;),Pair(&quot;zebra&quot;,&quot;z&quot;),Pair(&quot;cat&quot;,&quot;c&quot;))
  </code></pre>
  <p>Basically I want the <code>second</code> of the Pair to be a value computed using the array value.</p>
  <p>I realize I can create this using some combinations of a for loop. But is there a built in way using some function similar to <code>map</code> which does this?</p>