- 
                Notifications
    You must be signed in to change notification settings 
- Fork 21
Closed
Labels
Description
In the past few months I have sometimes wanted a takeTo method, which would take all elements up to and including the first for which a predicate was true. Or, in other words, the following equivalency would be true:
collection.takeTo(p) == collection.takeWhile(!p).initI haven't found easy way to simulate such method using the existing ones. I have either used sliding, with the inconvenients it presents, or simply went about my code in a completely different manner.
So I ask for this method to be added. The name I propose is based on the until/to distinction used for ranges.