apply method
Implementation
int apply(void Function(T) lambda, {bool ignoreExceptions = false}) {
int appliedValues = 0;
for (T element in this) {
try {
lambda(element);
appliedValues++;
} catch (error) {
if (!ignoreExceptions) {
rethrow;
}
}
}
return appliedValues;
}