feat(collections/unstable): add index arg to methods#6382
feat(collections/unstable): add index arg to methods#6382kt3k merged 5 commits intodenoland:mainfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6382 +/- ##
==========================================
- Coverage 94.28% 94.07% -0.22%
==========================================
Files 584 600 +16
Lines 43186 43528 +342
Branches 6933 6986 +53
==========================================
+ Hits 40720 40947 +227
- Misses 2413 2526 +113
- Partials 53 55 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I'm generally in favor of the idea. It looks useful in several places, and also this is aligned to the design of builtin map methods (such as What do people think? Note: Currently we have policy of accepting any new feature in |
I like it. |
|
I'm in favour. |
|
@kt3k should we add this in? |
|
I'm more than happy to rebase this if we want to move forward with it. Just let me know! |
|
I suggest rebasing anyway 🙂 |
bff3bbf to
c0c394e
Compare
|
@kt3k, it seems like this is a good idea to add. |
|
I support adding this! |
c0c394e to
b6b83da
Compare
kt3k
left a comment
There was a problem hiding this comment.
Hey, sorry for the very long delay in response!
This looks good to me. Let's first try these behaviors as unstable features. (I moved all implementations to unstable version of each API)
|
(Unrelated side note: I initially thought it might be better to change our new feature policy (all feature should be unstable first) to land this PR directly, but somehow failed to invent a new policy. That delayed the review process/decision...) |
Adds an
indexarg to collections' predicate/selector/transformer/discriminator method. I added it only to collection helpers that operate on iterables because collection helpers that operate on records don't seem as likely to need access to the key index. Please let me know if I missed any.Closes #6288