-
Notifications
You must be signed in to change notification settings - Fork 161
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 SortedList method with function #3376
Conversation
366da18
to
627a2ac
Compare
I’m pretty sure that if the appveyor tests are re run this will pass, the failure looks like it happened because I force pushed almost immediately after opening the PR |
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.
Thanks, this is really helpful; but I think the documentation should be a tiny bit clearer.
gap> SortedList([2, 1, 3]); | ||
[ 1, 2, 3 ] | ||
gap> SortedList([2, 1, 3], {x, y} -> y < x); | ||
[ 3, 2, 1 ] |
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.
Minor (completely optional) suggestion: Even better would be to also test that the input is not modified. E.g. by passing an immutable list to the function.
Codecov Report
@@ Coverage Diff @@
## master #3376 +/- ##
==========================================
- Coverage 85.14% 85.13% -0.01%
==========================================
Files 697 697
Lines 344069 344080 +11
==========================================
+ Hits 292941 292946 +5
- Misses 51128 51134 +6
|
(and feel free to squash any suggested changes by me, I do not need "credit" for them in any form either ;-). And don't worry about AppVeyor failing, that is simply broken right now (but hopefully I can get it fixed via PR #3377) |
I took the liberty of adding |
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.
This is my first review, so I might have missed something, but this looks good to me.
Co-Authored-By: Max Horn <max@quendi.de>
This PR adds a method for
SortedList
that takes a function as second argument.Resolves #1002.