ntegers to filter adjacent equal entries or count frequencies.</p>
<p>This method is preferred over <code>reduce(_:_:)</code> for efficiency when the
result is a copy-on-write type, for example an Array or a Dictionary.</p>
<p>The <code>updateAccumulatingResult</code> closure is called sequentially with a
mutable accumulating value initialized to <code>initialResult</code> and each element
of the sequence. This example shows how to build a dictionary of letter
frequencies of a string.</p>
<pre><code class="