<div dir="ltr">Oops, I forgot this existed.<div><br></div><div>I&#39;m assuming you&#39;re recommending popLast for performance reasons? Unfortunately, for a queue, you&#39;ll need either insertAtIndex(0)/popLast or append()/popLast (or a different data structure)...</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Jacob<br></div></div></div></div>
<br><div class="gmail_quote">On Wed, Jan 6, 2016 at 3:41 PM, Dave Abrahams via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">That method exists and is called popFirst<div><br></div><div>However, if you have an Array I suggest using popLast instead if you have the choice :-)</div><div><br><div><blockquote type="cite"><div><div class="h5"><div>On Jan 6, 2016, at 9:36 AM, James Campbell via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr">If you call removeFirst and the array is empty it would be great if it was optional so it could return nil or at least it threw an error so you could handle that case.<br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><span style="font-size:16px;line-height:19.2px"></span><span style="font-size:12.8px"> Wizard</span><br></div><div><a href="mailto:james@supmenow.com" target="_blank">james@supmenow.com</a></div><div><a href="tel:%2B44%207523%20279%20698" value="+447523279698" target="_blank">+44 7523 279 698</a></div></div></div></div></div></div>
</div>
</div></div><span class=""><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=JfMPa-2F7wwZPzsZ3QKA8NjtONIYX4SjbWuUxtpfsTY2i2g-2FoqdkQrJzoPiuBZaezNvOPKAFGBLR5fhSFnAo6eqX-2FP5vn42j4gfJ5IhVi0ICDsQXN5q6O8tAYHrDNOAjv0edtqRzBn0bT1WYcEYoR00HmUNzhG6UJSubG0bi1tb8S4Qig-2B0KoDrFrNhe81iI4rqep2cCIrwDdnQvHK3XIv89x561LsfEsC6EBQU0uiduI-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important">
_______________________________________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></span></div></blockquote></div><br><div>
-Dave<div><br></div><br>

</div>
<br></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=P-2BsYbBZHRBuLDBJaL4DIKDNfkkjpROowTyRAObV11qzdX7aAHDC9uoACV3BIsbR0nvSqQ-2FEP9sOfklfdKV4cKR5jWtzltEOflDEHBTatxUkLnyQGVJW3vqc51w9n7qTs1iF5knQ0HoPmKXJ45YzfF-2FMeKlld9W8MRCsS7x1FLIebad4qR5acMdtf2dgRIZP6pyZTgxL0OPV8WRCtsfSpEIEHdfKvPnZggg4e82rCCgM-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important">
</div>
<br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br></div></div>