Skip to content

Commit 8745b9e

Browse files
authored
Fix some issues in syntax reference (#13687)
1 parent f1f54df commit 8745b9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/elixir/pages/references/syntax-reference.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Data structures such as lists, tuples, and binaries are marked respectively by t
7676
7777
Maps use the `%{...}` notation and each key-value is given by pairs marked with `=>`, such as `%{"hello" => 1, 2 => "world"}`.
7878
79-
Both keyword lists (list of two-element tuples where the first element is atom) and maps with atom keys support a keyword notation where the colon character `:` is moved to the end of the atom. `%{hello: "world"}` is equivalent to `%{:hello => "world"}` and `[foo: :bar]` is equivalent to `[{:foo, :bar}]`. We discuss keywords in later sections.
79+
Both keyword lists (list of two-element tuples where the first element is an atom) and maps with atom keys support a keyword notation where the colon character `:` is moved to the end of the atom. `%{hello: "world"}` is equivalent to `%{:hello => "world"}` and `[foo: :bar]` is equivalent to `[{:foo, :bar}]`. We discuss keywords in later sections.
8080
8181
### Structs
8282
@@ -497,8 +497,8 @@ if(condition, [{:do, this}, {:else, that}])
497497
This same notation is available inside containers (such as `{...}`, `%{...}`, etc) as well:
498498
499499
```elixir
500-
{:foo, :bar, baz: :bat} == {:foo, :bar, {:baz, :bat}}
501-
%{:foo => :bar, baz: :bat} == %{:foo => :bar, :baz => :bat}}
500+
{:foo, :bar, baz: :bat} == {:foo, :bar, [{:baz, :bat}]}
501+
%{:foo => :bar, baz: :bat} == %{:foo => :bar, :baz => :bat}
502502
```
503503
504504
### `do`-`end` blocks

0 commit comments

Comments
 (0)