<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 31, 2015, at 4:19 PM, Kevin Ballard <<a href="mailto:kevin@sb.org" class="">kevin@sb.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<title class=""></title>
<div class=""><div class="">I've submitted a proposal to the ML for BufferedSequence / BufferedGenerator as <a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151228/005010.html" class="">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151228/005010.html</a>. </div></div></div></blockquote><div><br class=""></div><div>Thanks.</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div class="">I kept the name "peek" for the method because, as mentioned in that email, there's plenty of precedent for it.<br class=""></div></div></div></blockquote><div><br class=""></div>It’s a perfectly cromulent name for that purpose. I just don’t think it belongs in the type name.</div><div> <br class=""><blockquote type="cite" class=""><div class=""><div class="">
<div class=""> </div>
<div class="">-Kevin Ballard<br class=""></div>
<div class=""> </div>
<div class="">P.S. The plain-text version of the email is hard to read because the FastMail web interface doesn't handle rich text very well. The rich text version should be much more readable.<br class=""></div>
<div class=""> </div>
<div class="">On Thu, Dec 31, 2015, at 02:03 PM, Dave Abrahams wrote:<br class=""></div>
<blockquote type="cite" class=""><div class=""><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="">I suggest you consider adding a BufferedSequence<Base: SequenceType> that has a stable first property (at least until it is iterated)<br class=""></div>
</div>
</blockquote><div class=""> </div>
<div class="">Good idea, though I'd probably call it PeekSequence because it would only buffer a single element (and BufferedSequence sounds like it's got an arbitrary-sized buffer). Perhaps more useful would be the associated PeekGenerator, because peek() is a useful thing to have when writing custom generator-using code.<br class=""></div>
</div>
</div>
</blockquote><div class=""> </div>
<div class="">The size of the buffer is an implementation detail, and I don’t find “peek” descriptive.<br class=""></div>
</div>
</blockquote><div class=""> </div>
</div>
</div></blockquote></div><br class=""><div class="">
-Dave
</div>
<br class=""></body></html>