I want to iterate through my ArrayList named parts, here is my code:
for(x in parts.indices){
Log.i("INFO", parts.indices.toString())
}
The output is the following:
0..52
0..52
But I'd expect 0..52 to be printed 53 times. I've tried changing x in parts.indices to x in 0 until parts.size, but the output remains the same. Interestingly enough, when I use the same construction in another class with the same imports it works ok. What am I doing wrong?
0..52.... looping 53 times..0,1,2...52(0..52).toList().also { parts -> for (x in parts.indices) println(parts.indices) }-- prints0..5253 times.parts.forEach()?parts.map { indices }then.