whereE method

Enumerable<T> whereE (Condition<T> condition)

Filters the enumerable to elements that match the condition.

During iteration, elements are passed to the condition function. If the function returns true, the element is returned, and is discarded otherwise.

If all elements in the enumerable match the condition, the resulting enumerable will be unchanged.

Implementation

Enumerable<T> whereE(Condition<T> condition) {
  assert(condition != null);
  return WhereEnumerable<T>(this, condition);
}