📅  最后修改于: 2022-03-11 14:56:05.333000             🧑  作者: Mango
fun List.mix(other: List): List {
val first = iterator()
val second = other.iterator()
val list = ArrayList(minOf(this.size, other.size))
while (first.hasNext() && second.hasNext()) {
list.add(first.next())
list.add(second.next())
}
return list
}