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

Add Alphametics exercise #105

Merged
merged 9 commits into from
Sep 22, 2024
Merged

Add Alphametics exercise #105

merged 9 commits into from
Sep 22, 2024

Conversation

isaacvando
Copy link
Contributor

Originally I had solve return a set, but I decided to change it to a list instead because right now the inspect output for sets is very noisy so it makes it difficult to use the test failure output.

@ageron
Copy link
Contributor

ageron commented Sep 22, 2024

Cool exercise, and nice solution, congrats!
I feel like a Dict would have been better than a Set since each letter has a unique value.
But if the output is hard to read for Dict as well, then why not List, indeed.

@@ -0,0 +1,5 @@
module [solve]

solve : Str -> Result (List (U8, U64)) _
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This annotation differs slightly from the one in .meta/Example.roc: it uses (U8, U64) instead of (U8, U8). I suppose you want to use the latter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks! I will update this

@isaacvando isaacvando merged commit 9f245a6 into exercism:main Sep 22, 2024
2 checks passed
@isaacvando isaacvando deleted the alphametics branch September 22, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants