Enumerates the index of all array values that match predicate.
predicate
const data = [`red`,`blue`,`red`,`blue`,`red`];for (const index of filterWithIndex(data, v=> v === `red`)) { // Yields 0, 2, 4} Copy
const data = [`red`,`blue`,`red`,`blue`,`red`];for (const index of filterWithIndex(data, v=> v === `red`)) { // Yields 0, 2, 4}
Enumerates the index of all array values that match
predicate.