<How to get collection values in Kotlin lambda> I ...
# stackoverflow
u
How to get collection values in Kotlin lambda I have two collections: A and B. Both of them consist of equal amount of chars. I zip them. Then I need to count pairs of the same elements, like 'A' and 'A'. I need to write a predicate, but I can't find the way to get both elements from a zipped collection. I've tried something like this: val num = A.zip(B).count { it.i: Int, it.j:Int -> it.i == it.j} and this: val num = A.zip(guess).count { it[0] == it[2] } But it doesn't work. How can I reach both elements from these sub lists...