Skip to content

Commit 7ad36f1

Browse files
authored
Correct :as_list typo to :as_lists in inspect examples (#15464)
Fixes occurrences where :as_list was used instead of :as_lists for the :charlists option in List documentation and the getting started guide.
1 parent 8032f1d commit 7ad36f1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/elixir/lib/list.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ defmodule List do
102102
Even though the representation changed, the raw data does remain a list of
103103
integers, which can be handled as such:
104104
105-
iex> inspect(~c"abc", charlists: :as_list)
105+
iex> inspect(~c"abc", charlists: :as_lists)
106106
"[97, 98, 99]"
107107
iex> Enum.map(~c"abc", fn num -> 1000 + num end)
108108
[1097, 1098, 1099]

lib/elixir/pages/getting-started/binaries-strings-and-charlists.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ iex> heartbeats_per_minute = [99, 97, 116]
269269
You can always force charlists to be printed in their list representation by calling the `inspect/2` function:
270270

271271
```elixir
272-
iex> inspect(heartbeats_per_minute, charlists: :as_list)
272+
iex> inspect(heartbeats_per_minute, charlists: :as_lists)
273273
"[99, 97, 116]"
274274
```
275275

0 commit comments

Comments
 (0)