konsoletyper
val seq = listOf(1, 2, 3, 4) val (first, second) = seq.withIndex().partition { it.index % 2 == 0 } val result = first.map { it.value }.zip(second.map { it.value })