-
Notifications
You must be signed in to change notification settings - Fork 361
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
Unclear docs about Lists, "(x :: xs)" #1049
Comments
The docs are suggesting that you are probably better off writing case list of
[] -> ...
(x::xs) -> ... instead of if List.isEmpty list then
...
else
.... |
Ah! So with x::xs as a way of matching a non-empty list. Think I get it, then. If I can think of a way to clarify this in the docs I’ll make a PR. Thank you! |
I'll still try to make that PR, but before that, I thought I'd check something: Is the naming |
As discussed in elm#1049. Changing "x :: xs" to "head :: tail" throughout this file might make things een clearer, but I'm not sure if "x :: xs" is an established convention that we want to stick to.
As discussed in elm#1049. Changing "x :: xs" to "head :: tail" throughout this file might make things even clearer, but I'm not sure if "x :: xs" is an established convention that we want to stick to.
Hi!
Noticed that
core/src/List.elm
Line 509 in 6656248
We understand that
x :: xs
has to do with seeing a list as head and tail, but don't get how that applies in this case.The text was updated successfully, but these errors were encountered: