whereTo method
Appends all elements matching the given predicate
to the given
destination
.
Implementation
void whereTo(List<E> destination, bool Function(E element) predicate) {
for (var element in this) {
if (predicate(element)) {
destination.add(element);
}
}
}