dropLastWhile method
Returns a list containing all elements except last elements that satisfy the given predicate
.
Implementation
KtList<T> dropLastWhile(bool Function(T) predicate) {
if (!isEmpty()) {
final i = listIterator(size);
while (i.hasPrevious()) {
if (!predicate(i.previous())) {
return take(i.nextIndex() + 1);
}
}
}
return emptyList<T>();
}