Is there a way to iterate over a list of objects/pairs like so:
val list = listOf(Pair(1,2),Pair(2,3))
list.forEach { first, second ->
first + second
}
Following doesn't work either:
list.forEach { (first, second) in it ->
first + second
}