value, element);
});
return value;
</code></pre>
<p>Example of calculating the sum of an iterable:</p>
<pre class="language-dart"><code>iterable.reduce((value, element) =&gt; value + element);
</code></pre>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">E reduce(E combine(E value, E element)) {
  Iterator&lt;E&gt; iterator = this.iterator;
  if (!iterator.moveNext()) {
    throw