Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upShouldn't List.tail just return an empty list when there is no tail? #898
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
process-bot
Aug 15, 2017
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Aug 15, 2017
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
abread
commented
Aug 15, 2017
|
Thanks @process-bot |
abread
closed this
Aug 15, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
abread commentedAug 15, 2017
List.tail returns the whole list excluding the first element. This is equivalent to
List.drop 1, but using tail on an empty list (or a list with 1 element) we getNothing, and with drop we get an empty list.I believe that List.tail should return an empty list instead of
Nothing, to be more consistent with List.drop and to make code that manipulates the first element on the list easier to write.