I am filtering an array that can have many objects with a predicate. I would like to limit the results returned for performance reasons. The array is not sorted, so once the limit is hit, I would like the search to stop.
Is this possible? I am not sure if by means of predicate directive or otherwise.
I think you can use this combination of
indexesOfObjectsPassingTestandobjectsAtIndexes: