📅  最后修改于: 2022-03-11 14:53:33.032000             🧑  作者: Mango
val b: List = a.mapIndexed { i, b -> if (b) i else null }.filterNotNull().toList()
val c: List = a.withIndex().filter { it.value }.map { it.index }