Skip to content

Commit

Permalink
replace refernce to % with modBy
Browse files Browse the repository at this point in the history
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](elm#1034 (comment)), `remainderBy 0 n` currently returns `NaN` instead of leading to this page, so I didn't mention it.
  • Loading branch information
Ryan1729 authored Oct 5, 2020
1 parent 22eefd2 commit adb4ce7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hints/11.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If you let their support team know about this error, please give them a link to

## Info for Developers

Your application is calling `n % 0` at some point, causing a crash. This may be happening in your code or in a dependency.
Your application is calling `modBy 0 n` at some point, causing a crash. This may be happening in your code or in a dependency.

You can get more detailed information about when this happens if you can reproduce this error in dev mode.

Expand Down

0 comments on commit adb4ce7

Please sign in to comment.