The Wayback Machine - https://web.archive.org/web/20201122105331/https://github.com/elm/core/pull/1094
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

replace refernce to `%` with `modBy` #1094

Open
wants to merge 1 commit into
base: master
from
Open

Conversation

@Ryan1729
Copy link

@Ryan1729 Ryan1729 commented Oct 5, 2020

I just ran into a runtime error caused by calling Basics.modBy with the arguments in the wrong order, leading to a value of 0 as the first argument. The error had a link to the 1.0.0 version of the page i edited. My understanding is that % has been removed from the language, in favor of remainderBy and modBy, so, given that the old version of the page would still be around for old versions of elm, changing this to reference modBy seems better.

As mentioned in this issue comment, remainderBy 0 n currently returns NaN instead of leading to this page, so I didn't mention it.

I just ran into a runtime error caused by calling `Basics.modBy` with the arguments in the wrong order, leading to a value of 0 as the first argument. The error had a link to [the 1.0.0 version of the page i edited](https://github.com/elm/core/blob/1.0.0/hints/11.md). My understanding is that `%` has been removed from the language, in favor of `remainderBy` and `modBy`, so, given that the old version of the page would still be around for old versions of elm, changing this to reference `modBy` seems better. 

As mentioned in [this issue comment](#1034 (comment)), `remainderBy 0 n` currently returns `NaN` instead of leading to this page, so I didn't mention it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.