listen method

Iterable<T> listen(
  1. void listen(
    1. T
    )
)

Returns an Iterable that, for each element, calls listen with the current element.

Implementation

Iterable<T> listen(void Function(T) listen) sync* {
  for (final element in this) {
    listen(element);
    yield element;
  }
}