Oops, I forgot this existed. I'm assuming you're recommending popLast for performance reasons? Unfortunately, for a queue, you'll need either insertAtIndex(0)/popLast or append()/popLast (or a different data structure)...
Jacob On Wed, Jan 6, 2016 at 3:41 PM, Dave Abrahams via swift-evolution < [email protected]> wrote: > 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 < > [email protected]> 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. > > -- > Wizard > [email protected] > +44 7523 279 698 > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution > > > -Dave > > > > > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution > >
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
