Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: