Skip to content

Commit 6f5715f

Browse files
committed
Replace single quotes in charlist in doc (#13233)
1 parent 1ece71a commit 6f5715f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/elixir/pages/references/patterns-and-guards.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ iex> [head | tail] = []
159159
Given charlists are represented as a list of integers, one can also perform prefix matches on charlists using the list concatenation operator ([`++`](`++/2`)):
160160

161161
```elixir
162-
iex> 'hello ' ++ world = 'hello world'
163-
'hello world'
162+
iex> ~c"hello " ++ world = ~c"hello world"
163+
~c"hello world"
164164
iex> world
165-
'world'
165+
~c"world"
166166
```
167167

168-
Which is equivalent to matching on `[?h, ?e, ?l, ?l, ?o, ?\s | world]`. Suffix matches (`hello ++ ' world'`) are not valid patterns.
168+
Which is equivalent to matching on `[?h, ?e, ?l, ?l, ?o, ?\s | world]`. Suffix matches (`hello ++ ~c" world"`) are not valid patterns.
169169

170170
### Maps
171171

0 commit comments

Comments
 (0)