language-swift">let letters = &quot;abracadabra&quot;
let letterCount = letters.reduce(into: [:]) { counts, letter in
    counts[letter, default: 0] += 1
}
// letterCount == [&quot;a&quot;: 5, &quot;b&quot;: 2, &quot;r&quot;: 2, &quot;c&quot;: 1, &quot;d&quot;: 1]
</code></pre>
<p>When <code>letters.reduce(into:_:)</code> is called, the following steps occur:</p>
<ol>
<li>The <code>updateAccumulatingResult</code> closure is called with the initial
accumulating value---<code>[:]</code> in this case---and the