Replies: 1 comment 1 reply
-
|
I tend to use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
One utility function commonly found in the standard libraries of other languages allows the retrieval of a minimal or maximal element. (A separate
min_byis not necessary, as it can be achieved byFun.flip-ping the comparator function.)Currently the quick & dirty way to achieve this is sorting the list and taking the head element, but that is wasteful in terms of resources if only a single extreme element is needed to be found.
Is this be something you would consider adding to the library? If yes, I'll try to prepare and submit a PR with an implementation, tests and docs.
Beta Was this translation helpful? Give feedback.
All reactions