-
Notifications
You must be signed in to change notification settings - Fork 67
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
Make empty stream behavior of splitSepBySeq_ similar to splitSepBy_ #2912
Conversation
adithyaov
commented
Dec 20, 2024
•
edited
Loading
edited
- Check the benchmarks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add some doctests in splitSepBySeq_
and splitEndBySeq
similar to splitSepBy_ ? Also enable the doctests in splitBeginBy_
.
|
13f8f72
to
be62b4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep only interesting and minimal doctests for understanding the behavior. Move the rest to actual tests.
pure $ Skip $ SplitOnSeqSingle fs1 s pat | ||
FL.Done b -> yieldReinit jump b | ||
Skip s -> pure $ Skip $ SplitOnSeqSingle0 fs s pat | ||
Stop -> final fs >> pure Stop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See splitSepBy_ . We should have the same behavior. If we have not consumed any element we should not initialize the fold. We will be perform initialization and finalization unnecessarily.
splitSepBySeq runs the initial effect of Fold and finalizes it on an empty stream