title: Kotlin elegant way to mutate List<Triple<String, String, String> to Triple<List<String>, List<String>, List<String>>
body: <p>I'd like, as succinctly (yet clearly) as possible to transform a <code>List&lt;Triple&lt;String, String, String&gt;</code> to a <code>Triple&lt;List&lt;String&gt;, List&lt;String&gt;, List&lt;String&gt;&gt;</code>.</p>
  <p>For instance, say the method performing the transformation is called <code>turnOver</code>, I'd expect:</p>
  <pre class="lang-kotlin prettyprint-override"><code>val matches = listOf(
    Triple(&quot;a&quot;, &quot;1&quot;, &quot;foo&quot;),
    Triple(&quot;b&quot;, &quot;2&quot;, &quot;bar&quot;),
    Triple(&quot;c&quot;, &quot;3&quot;, &quot;baz&quot;),
    Triple(&quot;d&quot;, &quot;4&quot;, &quot;qux&quot;)
  )
  val expected = Triple(
    listOf(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;),
    listOf(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;),
    listOf(&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;, &quot;qux&quot;)
  )
  matches.turnOver() == expected // true
  </code></pre>
  <p>How to write a succinct, clear, and possibly functional <code>turnOver</code> function?</p>
  <p>It's ok to use Arrow-Kt, I already got it as project dependency.</p>