Adds Publisher.prefix(while:behavior:).#70
Adds Publisher.prefix(while:behavior:).#70freak4pc merged 2 commits intoCombineCommunity:mainfrom jasdev:prefix-inclusive
Conversation
Codecov Report
@@ Coverage Diff @@
## main #70 +/- ##
==========================================
+ Coverage 97.12% 97.20% +0.07%
==========================================
Files 62 64 +2
Lines 3336 3467 +131
==========================================
+ Hits 3240 3370 +130
- Misses 96 97 +1
Continue to review full report at Codecov.
|
|
The goal is an operator that passes through all of the upstream values, until and including the first value that fails the predicate. In the linked Swift forums thread, I implemented the requested operator as follows:
In my original code, the wrappers and the end-marker were cases of |
Figured we should add this to Ext after stumbling upon @jessegrosjean’s [Swift Forums thread](https://forums.swift.org/t/how-to-make-combines-prefix-operator-inclusive/39216) and @mayoff’s [approach with composed operators](https://forums.swift.org/t/how-to-make-combines-prefix-operator-inclusive/39216/8).
|
(Cleaning up some ol’ PRs — @freak4pc any chance we could land this in the next release whenever you get a chance to review? 🙏🏽) |
Figured we should add this to Ext after stumbling upon @jessegrosjean’s Swift Forums thread and @mayoff’s approach with composed operators.