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

Shouldn't List.tail just return an empty list when there is no tail? #898

Closed
abread opened this Issue Aug 15, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@abread

abread commented Aug 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 get Nothing, 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.

@process-bot

This comment has been minimized.

Show comment
Hide comment
@process-bot

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.

@abread

This comment has been minimized.

Show comment
Hide comment
@abread

abread Aug 15, 2017

Thanks @process-bot
This seems to fit the community forum better.

abread commented Aug 15, 2017

Thanks @process-bot
This seems to fit the community forum better.

@abread abread closed this Aug 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment