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

FeatureRequest: tryToInt #6

Open
Alch-Emi opened this issue Nov 25, 2024 · 1 comment
Open

FeatureRequest: tryToInt #6

Alch-Emi opened this issue Nov 25, 2024 · 1 comment

Comments

@Alch-Emi
Copy link

Hello! Would a contribution be accepted for a tryToInt function? I'm imagining a bounds check to make sure that the value being represented by the BigInt is representable by an Elm Int, then doing the conversion, ultimately returning Maybe Int.

I was wondering if there was a reason it wasn't currently implemented, or if it's just not something that anyone has implemented yet.

@cmditch
Copy link
Owner

cmditch commented Jan 22, 2025

@Alch-Emi Sorry for the late reply, I don't track github notifications super closely.

I'd be happy to review, merge, and release a toInt : BigInt -> Maybe Int function if you wanna give it a shot.

Thanks!

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

No branches or pull requests

2 participants