Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 595a460

Browse files
committed
The second element of tuple has been added some metadata.
Tested on Interactive Elixir (0.11.2-dev)
1 parent 5ed8126 commit 595a460

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

getting_started/5.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Operators are also represented as such tuples:
2828

2929
```iex
3030
iex> quote do: 1 + 2
31-
{ :+, [], [1, 2] }
31+
{:+, [context: Elixir, import: Kernel], [1, 2]}
3232
```
3333

3434
Even a tuple is represented as a call to `{}`:
@@ -49,7 +49,7 @@ When quoting more complex expressions, we can see the representation is composed
4949

5050
```iex
5151
iex> quote do: sum(1, 2 + 3, 4)
52-
{ :sum, [], [1, { :+, [], [2, 3] }, 4] }
52+
{:sum, [], [1, {:+, [context: Elixir, import: Kernel], [2, 3]}, 4]}
5353
```
5454

5555
In general, each node (tuple) above follows the following format:

0 commit comments

Comments
 (0)