-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
More List.drop simplifications #270
Conversation
@@ -7118,7 +7118,7 @@ a = List.drop 0 list | |||
|> Review.Test.run ruleWithDefaults | |||
|> Review.Test.expectErrors | |||
[ Review.Test.error | |||
{ message = "List.drop 0 will always return the same given list" | |||
{ message = "List.drop with count 0 will always return the same given list" |
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.
I feel like the previous error message was better 🤷♂️
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.
Nice. I'm unsure about the count error message, but let's go with that if you think it's better.
That's just a side effect of using the |
|
||
So for example | ||
|
||
Array.drop 3 (Array.repeat 2 a) --> [] |
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.
I think Array does not have a drop-function, only slice.
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!
Some simplifications from #268 and more