-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[stdlib] Add builtin any()
/all()
functions
#2600
Conversation
2347a27
to
4983c90
Compare
Nice, thank you! This will be useful and I can't wait for us to get further along with iterators and algorithms. Do you mind adding a changelog entry here please for this work? |
I have another one ready for bitwise |
now i feel like these all should've been done in one go to avoid the intermediate problems, but i guess there's a chance bitwise reduce might not be desired |
oh i forgot the changelog entry, hang on |
there's a typo in the changelog under the |
i guess we might want |
I'd say to match the python behavior (I have not checked) |
…truthy Signed-off-by: Max Brylski <helehex@gmail.com>
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.
This is great, thank you for working on this!
✅🟣 This contribution has been merged 🟣✅ Your pull request has been merged to the internal upstream Mojo sources. It will be reflected here in the Mojo repository on the nightly branch during the next Mojo nightly release, typically within the next 24-48 hours. We use Copybara to merge external contributions, click here to learn more. |
[External] [stdlib] Add builtin `any()`/`all()` functions Adds builtin functions for testing if there are truthy elements in `List`, `Set`, `SIMD`. Should change to check iterators eventually. Also mentioned [here](#2502) --------- Co-authored-by: Helehex <Helehex@gmail.com> Closes #2600 MODULAR_ORIG_COMMIT_REV_ID: 894768635c30c41fa359a69e5110b60adce735f8
Landed in f8a9dd0! Thank you for your contribution 🎉 |
[External] [stdlib] Add builtin `any()`/`all()` functions Adds builtin functions for testing if there are truthy elements in `List`, `Set`, `SIMD`. Should change to check iterators eventually. Also mentioned [here](modularml#2502) --------- Co-authored-by: Helehex <Helehex@gmail.com> Closes modularml#2600 MODULAR_ORIG_COMMIT_REV_ID: 894768635c30c41fa359a69e5110b60adce735f8 Signed-off-by: Lukas Hermann <lukashermann28@gmail.com>
[External] [stdlib] Add builtin `any()`/`all()` functions Adds builtin functions for testing if there are truthy elements in `List`, `Set`, `SIMD`. Should change to check iterators eventually. Also mentioned [here](modularml#2502) --------- Co-authored-by: Helehex <Helehex@gmail.com> Closes modularml#2600 MODULAR_ORIG_COMMIT_REV_ID: 894768635c30c41fa359a69e5110b60adce735f8
…bitwise operations (#40348) [External] [stdlib] Change `SIMD.reduce_and()`/`SIMD.reduce_or()` to bitwise operations changes the behavior of simd `reduce_and()`/`reduce_or()` to be bitwise operations. Theres a few things that are related to this: [builtin `any()`/`all()` functions](#2600) [constrain simd bool to size=1](#2502) Co-authored-by: Helehex <Helehex@gmail.com> Closes #2671 MODULAR_ORIG_COMMIT_REV_ID: 1ab75b0817529420ea8dd4baf3014ea97dc162ad
[External] [stdlib] Add builtin `any()`/`all()` functions Adds builtin functions for testing if there are truthy elements in `List`, `Set`, `SIMD`. Should change to check iterators eventually. Also mentioned [here](modularml#2502) --------- Co-authored-by: Helehex <Helehex@gmail.com> Closes modularml#2600 MODULAR_ORIG_COMMIT_REV_ID: 894768635c30c41fa359a69e5110b60adce735f8
…bitwise operations (#40348) [External] [stdlib] Change `SIMD.reduce_and()`/`SIMD.reduce_or()` to bitwise operations changes the behavior of simd `reduce_and()`/`reduce_or()` to be bitwise operations. Theres a few things that are related to this: [builtin `any()`/`all()` functions](modularml#2600) [constrain simd bool to size=1](modularml#2502) Co-authored-by: Helehex <Helehex@gmail.com> Closes modularml#2671 MODULAR_ORIG_COMMIT_REV_ID: 1ab75b0817529420ea8dd4baf3014ea97dc162ad
Adds builtin functions for testing if there are truthy elements in
List
,Set
,SIMD
.Should change to check iterators eventually.
Also mentioned here