Add Iterant.bufferSliding + bufferTumbling + batched#413
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #413 +/- ##
==========================================
+ Coverage 88.46% 88.52% +0.05%
==========================================
Files 338 339 +1
Lines 9236 9297 +61
Branches 1254 1245 -9
==========================================
+ Hits 8171 8230 +59
- Misses 1065 1067 +2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New
Iterantoperators:These all share the same implementation, more or less:
bufferSlidingis the exact equivalent of theslidingoperation on Scala's collection or ofObservable.bufferSlidingbufferTumbling(count)is a handy alias forbufferSliding(count, count)batched(count)is equivalent withbufferTumbling(count), however what it does is to emitNextBatchnodes, thus hiding the actual batches being emitted in the underlying implementation - this operator is useful for optimizing the representation of the sourceExample for
bufferSlidinggiven in the docs: