 sequentially with an
accumulating value initialized to <code>initialResult</code> and each element of
the sequence. This example shows how to find the sum of an array of
numbers.</p>
<pre><code class="language-swift">let numbers = [1, 2, 3, 4]
let numberSum = numbers.reduce(0, { x, y in
    x + y
})
// numberSum == 10
</code></pre>
<p>When <code>numbers.reduce(_:_:)</code> is called, the following steps occur:</p>
<ol>
<li>The <code>nextPartialResult</code> closure is called with <code>initialResult</code>