File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -201,8 +201,7 @@ defmodule Dict do
201
201
iex> d = HashDict.new([a: 1])
202
202
...> Dict.fetch!(d, :a)
203
203
1
204
- iex> d = HashDict.new([a: 1])
205
- ...> Dict.fetch!(d, :b)
204
+ iex> Dict.fetch!(d, :b)
206
205
** (KeyError) key not found: :b
207
206
208
207
"""
Original file line number Diff line number Diff line change @@ -372,8 +372,10 @@ defmodule Enum do
372
372
373
373
iex> Enum.fetch!([2,4,6], 0)
374
374
2
375
+
375
376
iex> Enum.fetch!([2,4,6], 2)
376
377
6
378
+
377
379
iex> Enum.fetch!([2,4,6], 4)
378
380
** (Enum.OutOfBoundsError) out of bounds error
379
381
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ defmodule Keyword do
152
152
153
153
iex> Keyword.fetch!([a: 1], :a)
154
154
1
155
+
155
156
iex> Keyword.fetch!([a: 1], :b)
156
157
** (KeyError) key not found: :b
157
158
@@ -357,6 +358,7 @@ defmodule Keyword do
357
358
358
359
iex> Keyword.update([a: 1], :a, &1 * 2)
359
360
[a: 2]
361
+
360
362
iex> Keyword.update([a: 1], :b, &1 * 2)
361
363
** (KeyError) key not found: :b
362
364
You can’t perform that action at this time.
0 commit comments