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

Updates secrets for order of operations clarity #1536

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

druyang
Copy link
Contributor

@druyang druyang commented Nov 25, 2024

The original example is slightly confusing because division and multiplication can be swapped in some cases and does not clearly show the order of operations:

  • The expected output (14) could be achieved through either (6 * 7) / 3 or (6 / 3) * 7.
  • As a result you could write both secret_function2.(secret_function1.(x)) or secret_function1.(secret_function2.(x)), but only 1 will pass test cases when the anonymous functions have varying order of operations.
  • In the revised version, the order matters and is clear (3+1=4, then 4*2=8 is different from 3*2=6, then 6+1=7)

The order matters and is clear
Copy link
Contributor

Thank you for contributing to exercism/elixir 💜 🎉. This is an automated PR comment 🤖 for the maintainers of this repository that helps with the PR review process. You can safely ignore it and wait for a maintainer to review your changes.

Based on the files changed in this PR, it would be good to pay attention to the following details when reviewing the PR:

  • General steps

    • 🏆 Does this PR need to receive a label with a reputation modifier (x:size/{tiny,small,medium,large,massive})? (A medium reputation amount is awarded by default, see docs)
  • Any exercise changed

    • 👤 Does the author of the PR need to be added as an author or contributor in <exercise>/.meta/config.json (see docs)?
    • 🔬 Do the analyzer and the analyzer comments exist for this exercise? Do they need to be changed?
    • 📜 Does the design file (<exercise>/.meta/design.md) need to be updated to document new implementation decisions?
  • Concept exercise changed

    • 🌲 Do prerequisites and practices in config.json need to be updated?
    • 📖 Does the concept introduction provide all necessary information to solve this exercise?

Automated comment created by PR Commenter 🤖.

Copy link
Contributor

@angelikatyborska angelikatyborska left a comment

Choose a reason for hiding this comment

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

That's a very good point. Thank you for the improvements 💜

@angelikatyborska angelikatyborska merged commit e2fbeec into exercism:main Nov 25, 2024
8 of 9 checks passed
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