<@U0MCQ3MBJ> ``` selectedChoices.foldIndexed(muta...
# announcements
l
@pavlospt
Copy code
selectedChoices.foldIndexed(mutableListOf<Int>()) { index, acc, bool ->
        if(bool) {
            acc.add(index)
            acc
        }
        else acc
    }
Can be ?
👍 2
m
lupajz: actually, acc is always returned so
if (bool) { acc.add(index) }; acc
👍 2
p
Where
acc
is the list of indexes right?
l
yes, your future list of indexes
p
Great! Thank you 🙂