 stream emits an error, or if the call to <code>action</code> throws,
the returned future completes with that error,
and processing stops.</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">Future forEach(void action(T element)) {
  _Future future = new _Future();
  StreamSubscription subscription;
  subscription = this.listen(
      (T element) {
        &#47;&#47; TODO(floitsc