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

Updates (::) documentation: Adds one more example. #556

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@rebelwarrior
Contributor

rebelwarrior commented Apr 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.

Updates (::) documentation: Adds one more example.
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.
@rebelwarrior

This comment has been minimized.

Show comment
Hide comment
@rebelwarrior

rebelwarrior Apr 28, 2016

Contributor

@jvoigtlaender Janis, this one is another documentation improvement. Please consider.

Contributor

rebelwarrior commented Apr 28, 2016

@jvoigtlaender Janis, this one is another documentation improvement. Please consider.

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

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.

Member

evancz commented Apr 28, 2016

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.

@evancz evancz closed this Apr 28, 2016

@rebelwarrior

This comment has been minimized.

Show comment
Hide comment
@rebelwarrior

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

Contributor

rebelwarrior commented Apr 28, 2016

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

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

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.

Member

evancz commented Apr 28, 2016

I mean, it should be in the docs somewhere that you can use infix operators as functions. Not here though.

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