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
Prelude: Add List.partition and Natural.{max,maximum,min,minimum,sort} #774
Conversation
|
min/minimum and max/maximum is not a very human-friendly naming scheme. |
35878bc
to
415a269
Compare
Works for me I guess – and I'm human. But please propose better names! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that Prelude.Natural.sort
is O(N^2) so in practice it will only handle lists of up to a few-thousand Natural
numbers, but we can optimize it in a follow-up change
… as suggested by @Gabriel439.
This is a special case of the Max and Min semigroups. |
Any other opinions on this? |
At least it’s not confusing ;) |
I personally liked the current naming scheme ( |
I mean it’s pretty easy to discern by its type, which I guess is what motivated the naming in Haskell in the first place. |
What about renaming to:
|
What would a |
It could take a comparison function:
or
|
This doesn't sound like a good guideline to use if we want Dhall to take over the non-Haskell world. (Whether we do is a different question though.) |
No description provided.