Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Add takeUntil operator #2227

Closed
LouisCAD opened this issue Sep 3, 2020 · 2 comments
Closed

[Feature request] Add takeUntil operator #2227

LouisCAD opened this issue Sep 3, 2020 · 2 comments

Comments

@LouisCAD
Copy link
Contributor

LouisCAD commented Sep 3, 2020

takeUntil { … } would be almost the same as takeWhile { … }, but once the predicate evaluates to true, the last value (where the predicate evaluated to true) still passes through, and the upstream flow is then immediately cancelled.

@pacher
Copy link

pacher commented Sep 4, 2020

Already implemented and released here #2065

@LouisCAD
Copy link
Contributor Author

LouisCAD commented Sep 4, 2020

Thanks for pointing that, it's written very clearly why there's no such named operator. In the meantime I had found transforWhile, and it's not so bad. I think I'll use a semicolon to cut down 3 lines of code.

@LouisCAD LouisCAD closed this as completed Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants