Comment obtenir l'index de l'article dans ArrayList à Kotlin

val b: List<Int> = a.mapIndexed { i, b -> if (b) i else null }.filterNotNull().toList()
val c: List<Int> = a.withIndex().filter { it.value }.map { it.index }
Stockholm