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

Add a Numbers.compare function #15

Open
Qqwy opened this issue Mar 14, 2020 · 0 comments
Open

Add a Numbers.compare function #15

Qqwy opened this issue Mar 14, 2020 · 0 comments

Comments

@Qqwy
Copy link
Owner

Qqwy commented Mar 14, 2020

It would be nice if we could use coercions in combination with a possibly overloaded MyNumberType.Compare protocol to have a comparison function that works regardless of whether you put integers, floats, decimals, rationals, etc. in your collection (which you then might call Enum.sort(my_collection, Numbers) on).

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

1 participant