title: kotlin list of Pair into list of Pair.first
body: <p>I'm trying to get used to the idioms and shortcuts in Kotlin and I'm wondering if there was any way to do this.</p>
  
  <pre><code>val pairList = listOf(Pair(1, 2), Pair(5, 10), Pair(12, 15))
  val firstList = // should be [1, 5, 12]
  </code></pre>
  
  <p>Or in general, any class with any one of their member variables. I currently have:</p>
  
  <pre><code>val pairList = listOf(Pair(1, 2), Pair(5, 10), Pair(12, 15))
  val firstList = ArrayList&lt;Int&gt;()
  pairList.forEach { firstList.add(it.first) }
  </code></pre>