mapWhere method

Iterable<E> mapWhere(
  1. Predicate<E> p,
  2. Transform<E, E> f
)

Maps over elements that satisfy the given predicate.

Implementation

Iterable<E> mapWhere(Predicate<E> p, Transform<E, E> f) sync* {
  for (final e in this) {
    if (p(e)) yield f(e);
  }
}