-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
lib.dropEnd
#370558
lib.dropEnd
#370558
Conversation
Naming borrowed from Haskell - `base`: [`dropWhileEnd`] - `extra`, `mono-traversable`, ...: [`dropEnd`] [`dropEnd`]: https://hackage.haskell.org/package/mono-traversable-1.0.21.0/docs/Data-Sequences.html#v:dropEnd [`dropWhileEnd`]: https://hackage.haskell.org/package/base-4.21.0.0/docs/Data-List.html#v:dropWhileEnd
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.
LGTM, but I have no say in this.
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.
A very minor nit.
@@ -854,6 +854,30 @@ runTests { | |||
([ 1 2 3 ] == (take 4 [ 1 2 3 ])) | |||
]; | |||
|
|||
testDrop = let inherit (lib) drop; in testAllTrue [ | |||
# list index -1 is out of bounds | |||
# ([ 1 2 3 ] == (drop (-1) [ 1 2 3 ])) |
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.
# ([ 1 2 3 ] == (drop (-1) [ 1 2 3 ])) | |
# ([ 1 2 3 ] == (drop (-1) [ 1 2 3 ])) |
Successfully created backport PR for |
drop
dropEnd
Naming borrowed from Haskell
base
:dropWhileEnd
extra
,mono-traversable
, ...:dropEnd
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.