[swift-evolution] removeFirst, optional equiviliant
dabrahams at apple.com
Wed Jan 6 17:41:14 CST 2016
That method exists and is called popFirst
However, if you have an Array I suggest using popLast instead if you have the choice :-)
> On Jan 6, 2016, at 9:36 AM, James Campbell via swift-evolution <swift-evolution at swift.org> wrote:
> 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.
> james at supmenow.com <mailto:james at supmenow.com>
> +44 7523 279 698
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution