Skip to content
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

[mojo-stdlib] Add List.count(value) method #2406

Closed
wants to merge 5 commits into from

Conversation

StandinKP
Copy link

@StandinKP StandinKP commented Apr 25, 2024

Add List.count(value) method to count the number of occurrences of a value in the List.

Fixes #2263

@StandinKP StandinKP requested a review from a team as a code owner April 25, 2024 12:04
@StandinKP StandinKP changed the title Fn and test added and checked [mojo-stdlib] Fn and test added and checked Apr 25, 2024
stdlib/test/collections/test_list.mojo Show resolved Hide resolved
stdlib/src/collections/list.mojo Outdated Show resolved Hide resolved
stdlib/src/collections/list.mojo Outdated Show resolved Hide resolved
@JoeLoser JoeLoser changed the title [mojo-stdlib] Fn and test added and checked [mojo-stdlib] Add List.count(value) method Apr 27, 2024
@StandinKP
Copy link
Author

@JoeLoser are we having any ticket to track adding the conditional conformance? Is that something we can work on or is it going to be internal development?

@gabrieldemarmiesse
Copy link
Contributor

@StandinKP it's something that must be done internally. There is an issue here: #1876 to follow the progress if you want. It seems that it's not going to be available in the short term

@StandinKP StandinKP requested review from jackos and a team as code owners April 30, 2024 04:36
Signed-off-by: Kaushal Phulgirkar <kaushalpp01@gmail.com>
Signed-off-by: Kaushal Phulgirkar <kaushalpp01@gmail.com>
Signed-off-by: Kaushal Phulgirkar <kaushalpp01@gmail.com>
Signed-off-by: Kaushal Phulgirkar <kaushalpp01@gmail.com>
Signed-off-by: Kaushal Phulgirkar <kaushalpp01@gmail.com>
@JoeLoser JoeLoser added the imported-internally Signals that a given pull request has been imported internally. label May 1, 2024
JoeLoser pushed a commit that referenced this pull request May 3, 2024
[External] [mojo-stdlib] Add `List.count(value)` method

Add `List.count(value)` method to count the number of occurrences of a
value in the `List`.

Fixes #2263

---------

Co-authored-by: Kaushal Phulgirkar <kaushalpp01@gmail.com>
Closes #2406
MODULAR_ORIG_COMMIT_REV_ID: e9e9be6db11d56f951e94daf22fd0ff8520615fa
@JoeLoser
Copy link
Collaborator

JoeLoser commented May 5, 2024

This landed internally and got pushed out already - see c37a3ec. Closing this PR.

Thanks again for the contribution!! 🎉

@JoeLoser JoeLoser closed this May 5, 2024
@JoeLoser JoeLoser added merged-internally Indicates that this pull request has been merged internally merged-externally Merged externally in public mojo repo labels May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported-internally Signals that a given pull request has been imported internally. merged-externally Merged externally in public mojo repo merged-internally Indicates that this pull request has been merged internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants