Skip to content
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

Pipe operator used before it's introduced #2788

Closed
snus-kin opened this issue Apr 10, 2022 · 7 comments
Closed

Pipe operator used before it's introduced #2788

snus-kin opened this issue Apr 10, 2022 · 7 comments

Comments

@snus-kin
Copy link

Hi,

Nothing major, just reading through the lessons and the pipe operator is used in examples on the functions page before it's introduced by the next page, kind of just breaks the flow is all in my opinion.

Functions Lesson

@allefgomes
Copy link
Contributor

Yeah! You are right.
I saw that in guards session the pipe operator appear and don't have a previews explanation about it.

The sessions that use pipe operator are:
Guards
Default Arguments

I think that we have two options:

  1. We can put a simple signification like "The pipe operator |> is to send the result of function A to function B as the first argument. You will understood more about pipe operator in the next lesson" .
  2. The Guards and Default Arguments sessions can be after introduction of pipe operator.

@snus-kin
Copy link
Author

Personally (and as someone who is not familiar with Elixir) it seems like a fairly important part of the language's syntax. Perhaps something could be mentioned (as to the effect of option 1) in the first chapter?

From the Pipe Operator page:
"The pipe operator |> passes the result of an expression as the first parameter of another expression."

This seems like a fairly simple and intuitive explanation that could be included, perhaps then reference there is more detail in the dedicated chapter to it.

@allefgomes
Copy link
Contributor

@doomspork can you close this issue?
It was finally at #2799

@doomspork
Copy link
Member

Done, thank you again @allefgomes!

@doomspork
Copy link
Member

@allefgomes we should backport this change to the other languages. Would you like to do that? If not I'm happy to do so.

@snus-kin
Copy link
Author

Cheers @allefgomes

@allefgomes
Copy link
Contributor

@allefgomes we should backport this change to the other languages. Would you like to do that? If not I'm happy to do so.

I can do it in the next week :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants