In objectiveC I have an NSArray, let\'s call it NSArray* largeArray, and I want to get a new NSArray* smallArray with just the first x objects
NSArray* largeArray
NSArray* smallArray
Here's the obvious long-hand way of doing it:
NSMutableArray* smallMutableArray; if ([largeArray count] <= x) { smallMutableArray = [largeArray copy]; } else { for (int i=0; i