-
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
Implement take
, truncate
, skip
and drop
#209
Conversation
04ecbf2
to
3f12fd9
Compare
aa666c5
to
bd2d616
Compare
This is ready, now that the obvious errors are fixed ;) |
Added |
0b974f8
to
52c76be
Compare
Thanks for the review, @bartelink. I'll merge this in as soon as it passes the tests. |
52c76be
to
642e73e
Compare
642e73e
to
f3e0e64
Compare
I sorted out the issue with the test reports not showing. Reported here: dorny/test-reporter#343 (see my comments). See also this thread: actions/upload-artifact#472 |
f3e0e64
to
79f0bc4
Compare
…fantomas#3019" This reverts commit 9acc527.
This fixes part of #208, the following signatures are added and implemented (todo: tests)
Note that
skip
andtake
raise if there are not enough elements (just like itsSeq
counterparts) and thattruncate
anddrop
do not raise. Whiledrop
does not exist inSeq
, I felt it make sense astruncate
also exists. Maybe it can be added to F# Core?PS, in case anybody wondered, I chose the name
drop
simply because it exists in Scala. I'm not a fan of Scala per se, but was just looking for existing functions that behave like this one, and indeed, the Scala function does not raise either.See also discussion here: https://stackoverflow.com/questions/1247788/calling-seq-skip-and-seq-take-in-f
TODO list:
TaskSeq.skip
TaskSeq.take
TaskSeq.drop
TaskSeq.truncate