feat(func): add FuncWithIndex and FuncWithIndexNoReturn#565
feat(func): add FuncWithIndex and FuncWithIndexNoReturn#565quantumsheep wants to merge 1 commit intosamber:masterfrom
FuncWithIndex and FuncWithIndexNoReturn#565Conversation
Signed-off-by: Nathanael DEMACON <quantumsheep@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #565 +/- ##
==========================================
+ Coverage 94.33% 94.35% +0.01%
==========================================
Files 17 17
Lines 2790 2798 +8
==========================================
+ Hits 2632 2640 +8
Misses 154 154
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Wow. also faced that issue, and made a quite similar solution: |
Glad to see I'm not the only one wanting a feature like this :) |
|
I agree. But I would vote for duplicating
|
|
@samber If it's the one with index, I wonder if that's a good idea as it will break many projects. Or it will require a major update. What do you think? |
|
Yes 😅 I would break a large ecosystem. I'm just sharing some ideas. Not telling we are going to do it right now 😇 |
|
Then I really prefer this option! I'm not sure how people use Is there a place where contributors can discuss the changes for v2? I would like to help 😄 |
|
@quantumsheep see #579 |
Hey! I regularly write some functions that I pass to
lo.Mapand it's a hassle to have to pass the index every time.Currently:
With the PR:
I'm not sure about the naming, it could simply be
WithIndex.I hope you like the idea.