We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example: toBase will accept negative Ints as parameters. It would be nice for comments to address the behavior in this case.
toBase
Int
The text was updated successfully, but these errors were encountered:
There are multiple options here, I guess:
simply document the current behavior (I have no idea what happens)
clamp the integer argument to the maximum range (2..36?)
clamp
Follow a similar approach as in Add conversions to a different base, fixes #17, fixes #18 purescript/purescript-integers#19 and only allow certain arguments.
Sorry, something went wrong.
for 1, from what I've seen, weird things happen :)
I'd say adopt 2 and offer 3 as an alternative API. The perf hit should be negligible considering the other things that this lib does.
Agreed - thanks!
Actually, the underlying lib does handle weird bases, and documents what happens with them. Probably worth just repeating that documentation.
No branches or pull requests
Example:
toBase
will accept negativeInt
s as parameters. It would be nice for comments to address the behavior in this case.The text was updated successfully, but these errors were encountered: