I have a list I want to filter, but end after a certain amount of successful items in the result. How would I do that?
My filter has an expensive operation
list.filter(expensiveOperation)
and I only need say 20 results from the list.
I have a list I want to filter, but end after a certain amount of successful items in the result. How would I do that?
My filter has an expensive operation
list.filter(expensiveOperation)
and I only need say 20 results from the list.