-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
The method:
{Element*} takeUntil(Boolean stopping(Element element))would be similar to takeWhile, with the following differences:
- The passed in function would return
trueto signal the end of the stream, rather thanfalse - The
elementthat caused the "stop" would be included in the resultant stream (takeWhilediscards the "final" element).
This is useful if your goal is to take all elements up to and including the "element you are looking for". found could also be used as the name for the passed in function.