forEachIndexed
Iterates over each bit in the BitSet and invokes the provided action for every index and corresponding bit value.
Deliberatelly not an extension function, to have precedence over the int-indexed forEach function of the Iterable interface.
Parameters
action
A lambda function that is invoked with two arguments:
i: The index of the bit in theBitSet.it: The value of the bit at the given index, eithertrueorfalse.