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 upUpdates (::) documentation: Adds one more example. #556
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rebelwarrior
Apr 28, 2016
Contributor
@jvoigtlaender Janis, this one is another documentation improvement. Please consider.
|
@jvoigtlaender Janis, this one is another documentation improvement. Please consider. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Apr 28, 2016
Member
I'd rather not have this in the docs here. Beginners are likely to see 1 :: [2,3] pretty early on with Elm, whereas knowing that infix operators can be used as functions is kind of advanced. I suspect that adding this will be more confusing for beginners who do not need to know about this feature that is not directly related to cons.
|
I'd rather not have this in the docs here. Beginners are likely to see |
evancz
closed this
Apr 28, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rebelwarrior
Apr 28, 2016
Contributor
There is one reason I disagree.
The pipe operator.
If you don't know you can do that you can't chain cons in a pipe operation.
It is rather advanced so maybe we can put it in another place?
Sent from my mobile.
On Apr 27, 2016, at 8:28 PM, Evan Czaplicki notifications@github.com wrote:
I'd rather not have this in the docs here. Beginners are likely to see 1 :: [2,3] pretty early on with Elm, whereas knowing that infix operators can be used as functions is kind of advanced. I suspect that adding this will be more confusing for beginners who do not need to know about this feature that is not directly related to cons.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
|
There is one reason I disagree. The pipe operator. If you don't know you can do that you can't chain cons in a pipe operation. It is rather advanced so maybe we can put it in another place? Sent from my mobile.
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Apr 28, 2016
Member
I mean, it should be in the docs somewhere that you can use infix operators as functions. Not here though.
|
I mean, it should be in the docs somewhere that you can use infix operators as functions. Not here though. |
rebelwarrior commentedApr 7, 2016
This makes clear that to call the
(::)as a function you need to wrap the::in parenthesis by adding another example.The example uses
(::)as a function so it shows how it would be used with a pipe operator.--This example doesn't use the pipe operator itself
|>so it's much simpler than the previous one I submitted.