<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 Jan 6, 2016, at 3:48 PM, Jacob Bandes-Storch <<a href="mailto:jtbandes@gmail.com" class="">jtbandes@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: AvenirNext-Regular; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Whoops, I meant append()/popFirst. That is, even for a single-ended queue, you'll use one "first" operation (less efficient) and one "last" operation.</div></div></blockquote><div><br class=""></div>No, a single-ended queue is a stack. You can use append and popLast on Array for that.</div><div><br class=""><blockquote type="cite" class=""><div dir="ltr" style="font-family: AvenirNext-Regular; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Jan 6, 2016 at 3:47 PM, Dave Abrahams<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:dabrahams@apple.com" target="_blank" class="">dabrahams@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><br class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On Jan 6, 2016, at 3:42 PM, Jacob Bandes-Storch <<a href="mailto:jtbandes@gmail.com" target="_blank" class="">jtbandes@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Oops, I forgot this existed.<div class=""><br class=""></div><div class="">I'm assuming you're recommending popLast for performance reasons? Unfortunately, for a<span class="Apple-converted-space"> </span></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">…double-ended…</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">queue, you'll need either insertAtIndex(0)/popLast or append()/popLast (or a different data structure)…</div></div></div></blockquote><div class=""><br class=""></div>Yes, the standard library should acquire a Deque data structure at some point.</div></div></blockquote><div class=""><br class=""></div><div class="">Is there a SR for this?</div></div></div></div></blockquote><div><br class=""></div>Not that I know of; have at it!</div><div><br class=""></div><div>-Dave</div><div class=""><div class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>