filterWindowed
fun <T> List<T>.filterWindowed(dropIndices: List<Boolean>, predicate: (List<T>) -> Boolean): List<T>
Returns a list containing all elements not matching the given predicate. The predicate is operated on a sublist and if the pattern matches the elements with indices dropIndices are dropped.
Example Given a list: A, A, B, C, A, A, B, C, A Predicate: it0 == A && it1 == B && it2 == C DropIndices: (false, true, true) Return: A, B, A, B
Receiver
list on which the window filter is applied
Return
list without elements which match the predicate
Parameters
predicate
if the predicate returns true, the indices are dropped according to the dropIndices