-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add filter, map and reduce to Array #38645
Conversation
Ok, added error checking (not sure if I did it correctly) and docs. |
aca8ad5
to
8b07943
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.
Docs look good to me
If we are adding this, how about Take(n) / TakeWhile(predicate) Basically just implement part of C# linq lol. Would be interested in working on that in a separate pr. |
@EricEzaM These can be implemented in a separate PR. Note that |
I done the requested changes. Also in another commit I optimized the |
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.
Sorry for taking so long, this slipped my mind. Although we need an okay from reduz to merge this.
I pushed some changes. When doing the Tween PR I learned the proper way of handing Callable calls (by seeing how |
Rebased and updated documentation with lambda functions (also edited OP with lambda examples). |
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.
LGTM. Thanks!
Thanks! |
I see it's already merged but gonna write it in here anyway: docs descriptions for |
very nice, thanks a lot |
Closes #17268
Example code:
The result is:
EDIT:
Here's lambda version btw: