3 ms·
Let's be fair, in Objective-C, this could be actually more like NSIndexSet *indicies = [allRecords indexesOfObjectsPassingTest:^ (id obj, NSUInteger idx, BOO
by icodestuff 15y ago
Let's be fair, in Objective-C, this could be actually more like
NSIndexSet *indicies = [allRecords indexesOfObjectsPassingTest:^ (id obj, NSUInteger idx, BOOL *stop) { return [obj someField] == someFieldFilterValue; }];
filteredArray = [allRecords objectsAtIndexes:indicies];
rather than what the article had in mind.
EDIT: oh, someFieldFilterValue was an integer, wasn't it. Fixed.