<div dir="ltr">Hi,<div><br></div><div>How does everyone feel about adding a second version of `reduce` to `Sequence`? Instead of a `combine` function that&#39;s of type `(A, Element) -&gt; A`, it would be `(inout A, Element) -&gt; ()`. This way, we can write nice functionals algorithms, but have the benefits of inout (mutation within the function, and hopefully some copy eliminations).</div><div><br></div><div>IIRC, Loïc Lecrenier first asked this on Twitter. I&#39;ve been using it ever since, because it can really improve readability (the possible performance gain is nice, too).</div><div><br></div><div>Here&#39;s `reduce` with an `inout` parameter, including a sample: <a href="https://gist.github.com/chriseidhof/fd3e9aa621569752d1b04230f92969d7">https://gist.github.com/chriseidhof/fd3e9aa621569752d1b04230f92969d7</a><br></div><div><div><br></div>-- <br><div class="gmail_signature">Chris Eidhof</div>
</div></div>