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
[RU] Improve the explanation of pattern matching #810
[RU] Improve the explanation of pattern matching #810
Conversation
@@ -12,7 +12,7 @@ lang: ru | |||
|
|||
## Оператор сопоставления | |||
|
|||
В языке Elixir оператор `=` называется оператором сопоставления. С его помощью можно как назначать, так и сравнивать значения: | |||
В языке Elixir оператор `=` на самом деле является оператором сопоставления по аналогии со знаком равенства в алгебре. Его использование превращает всё выражение в уравнение, и Elixir сопоставляет левую часть выражения с правой. В случае успешного сопоставления вернётся решение уравнения, иначе возникнет ошибка: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
всё выражение
всё
тут лишнее
В случае успешного сопоставления вернётся решение уравнения, иначе возникнет ошибка
Вернется на самом деле само решенное уравнение.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @brain-geek!
I don't clearly understand why do you suggest само решенное уравнение
instead of решение уравнения
. For example, x = 1
returns and assigns the solution but not the equation itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if you're talking about example like
{true, x} = Application.getenv()
the solution is x
, while {true, x}
gets returned.
@nscyclone Please look at the feedback. |
039996f
to
2c9e0c4
Compare
Thanks, @brain-geek, I've addressed all of your feedback. Merging this. |
The original changes can be found in #808.
@brain-geek, could you review this, please?