-
Notifications
You must be signed in to change notification settings - Fork 8
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
Port TaskSeq.takeWhileInclusive #122
Comments
Spike impl:
(derived from Internal.tryPick + base impl ) In context: https://github.com/jet/equinox/blob/master/src/Equinox.Core/Internal.fs#L15-L45 |
Thanks for your suggestion @bartelink! So this is like “get next, yield that, test predicate on that one, if true, repeat”. That is, return element first, before testing predicate. Interesting function. I was about to add a whole section (just like I did for Your proposal looks good, as does the code, feel free to issue a PR, it’ll need to have matching tests (I’m a little more rigorous than the AsyncSeq team in that regard and need notable corner cases), but I can help you with that. |
Btw, it should probably be added together with |
Thanks! Yes, I had noted that there was going to be no skimping on test coverage based on poking around ;) But that's also why I confidently spent time converting Equinox and Propulsion over. Won't get to the PR immediately but I'll get to it... |
Does it make sense to also add a |
That does seem to make sense (although I'm struggling to think of a time I've ever had the use case), but arguably you'd call it |
|
This issue was implemented in #126 and will be published in the next version of NuGet (be it 0.4.0 or 0.3.x). 💯 @bartelink |
On reflection, my suggestion doesn't make as much sense as it did in my head as I typed it. I was suggesting to replace the usage of the term 130 would be the better for removing any reference to |
I'd like to see
takeWhileInclusive
(it has uses in Equinox) be ported from AsyncSeq.Will post a PR to add it to the TODO list (and then one to implement it) in due course unless someone beats me to it, or there are objections to adding it...
The text was updated successfully, but these errors were encountered: