findIndices package:Stream

The findIndices function extends findIndex, by returning the indices of all elements satisfying the predicate, in ascending order. Beware: findIndices p xs will diverge if all the elements of any suffix of xs fails to satisfy p.