<div dir="ltr">I wasn&#39;t counting Zip as that tracks it for different reasons (as you point out). The remaining two are in UTF-8/UTF-16 decoding (the done flag is inside the lookahead flags):<div><a href="https://github.com/apple/swift/blob/master/stdlib/public/core/Unicode.swift#L296">https://github.com/apple/swift/blob/master/stdlib/public/core/Unicode.swift#L296</a><br></div><div><a href="https://github.com/apple/swift/blob/master/stdlib/public/core/Unicode.swift#L485">https://github.com/apple/swift/blob/master/stdlib/public/core/Unicode.swift#L485</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 19, 2016 at 2:16 PM, Brent Royal-Gordon <span dir="ltr">&lt;<a href="mailto:brent@architechies.com" target="_blank">brent@architechies.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">&gt; Current – post-nil unspecified<br>
&gt; – Responsibility of the caller, needs to be aware of the API contract and needs to track a bool and branch when relying on post-nil.<br>
&gt; – Standard library currently has 3 occurrences of this being necessary.<br>
<br>
</span>I got curious and decided to try to locate these. I found two:<br>
<br>
<a href="https://github.com/apple/swift/blob/a147a582fec7f0bcf058d089d79fb0950c261db9/stdlib/public/core/Sequence.swift#L435" rel="noreferrer" target="_blank">https://github.com/apple/swift/blob/a147a582fec7f0bcf058d089d79fb0950c261db9/stdlib/public/core/Sequence.swift#L435</a><br>
<a href="https://github.com/apple/swift/blob/97d8f50af4978e54289377a0bd205e71a34529a2/stdlib/public/core/Zip.swift#L52" rel="noreferrer" target="_blank">https://github.com/apple/swift/blob/97d8f50af4978e54289377a0bd205e71a34529a2/stdlib/public/core/Zip.swift#L52</a><br>
<br>
(Interestingly the Zip one is defensive programming: ZipGenerator.next() is ensuring it doesn&#39;t incorrectly call its child generators&#39; next() methods even if is itself called too many times.)<br>
<br>
What was the third? I must have missed it.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Brent Royal-Gordon<br>
Architechies<br>
<br>
</font></span></blockquote></div><br></div>