How can I remove the first element of an array in Objective C?
arrays, objective-c
Solution
I don't know of a method that returns the item removed, but you can do this using a combination of `NSArray#objectAtIndex:0` and `NSMutableArray#removeObjectAtIndex:0`. I suppose you could introduce a new method category on `NSMutableArray` that implements a `shift` method.
Problem
In Objective C, is there a one-liner or something small to remove (shorten by one) and return the first element of an array, regardless of its index?