Skip to content

Need inclusive predicate variant of takeUntil/takeWhile #1649

@samueltardieu

Description

@samueltardieu

It has been two times I've been missing a takeUntil(filter) operator on observables. The last time was in cgeo while implementing a low-power mode: I want to receive location updates through an observable and stop as soon as a location arrives with a precision of 20m or less, but I want this location to be returned. Using takeWhile(!filter) would drop the matching item.

Of course, this can be worked around, but I was surprised not to get this operator which is the dual of takeWhile. Would you consider a contribution adding it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions