Skip to content

Commit

Permalink
Better document when -> can be used, closes #8386
Browse files Browse the repository at this point in the history
  • Loading branch information
José Valim committed Nov 14, 2018
1 parent 725a36f commit 08b807f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/elixir/pages/Syntax Reference.md
Expand Up @@ -118,7 +118,7 @@ Blocks are multiple Elixir expressions separated by newlines or semi-colons. A n

### Left to right arrow

The left to right arrow (`->`) is used to establish a relationship between left and right. The left side may have zero, one, or more arguments; the right side is zero, one, or more expressions separated by new line. The `->` is always between one of the following terminators: `do`/`end`, `fn`/`end` or `(`/`)`.
The left to right arrow (`->`) is used to establish a relationship between left and right, commonly referred as clauses. The left side may have zero, one, or more arguments; the right side is zero, one, or more expressions separated by new line. The `->` may appear one or more times between one of the following terminators: `do`/`end`, `fn`/`end` or `(`/`)`. When `->` is used, only other clauses are allowed between those terminators. Mixing clauses and regular expressions is invalid syntax.

It is seen on `case` and `cond` constructs between `do`/`end`:

Expand Down

0 comments on commit 08b807f

Please sign in to comment.