:)</code> method to produce a single value from the elements
of an entire sequence. For example, you can use this method on an array
of numbers to find their sum or product.</p>

<p>The <code>nextPartialResult</code> closure is called 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