<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=""><div class="">Hi, James. I'm having trouble thinking of when I want to remove something from an array <i class="">unless</i>&nbsp;the array is empty. The one case I can think of is when an array is being treated as a stack or queue and you're popping in a loop, but I (personally) rather write that with an explicit isEmpty check anyway. (It's not like it's any more or less efficient.)</div><div class=""><br class=""></div><div class="">Is there another scenario that I'm missing where this would be useful?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Jordan</div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 6, 2016, at 9:36, James Campbell via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">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" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><span style="font-size:16px;line-height:19.2px" class=""></span><span style="font-size:12.8px" class="">&nbsp;Wizard</span><br class=""></div><div class=""><a href="mailto:james@supmenow.com" target="_blank" class="">james@supmenow.com</a></div><div class="">+44 7523 279 698</div></div></div></div></div></div>
</div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=ZEz4qHYnXhPr3bBPu-2FxP4tN3HfWKL-2FtJpqkQ0gkOVSB-2FleFnOllUkEWhS8K2fwGFfOTR0JFaCmzO6fmlSorPVHwiMLEQxo1rDtuK9Gt9PxZJ1cdXfR7r6FxJRbhv-2FOzEPKcJSOyMwo2168jC8wJ6JEA5nJvKsof-2FidwF-2FQ61lvAOmUCPLDmi5DwwyXF5QiWWQiO6aA7uv6eOX2EOPYUe7pQaHvSvG21tGM5Q7VSAkaw-3D" alt="" width="1" height="1" border="0" style="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;" class="">
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>