Skip to content

Commit d4efc7b

Browse files
author
José Valim
committed
Make it clear Dict.merge expects an enum that yields two-item tuples
1 parent 3c7fb0d commit d4efc7b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/elixir/lib/dict.ex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ defmodule Dict do
258258
already exists in `dict`, the `dict` value is replaced by the `enum`
259259
value.
260260
261+
The `enum` must yield tuples with two elements on enumeration,
262+
where the first element represents the key and the second the value.
263+
261264
## Examples
262265
263266
iex> d1 = dict_impl.new([a: 1, b: 2])
@@ -277,6 +280,9 @@ defmodule Dict do
277280
already exists in `dict`, the given function is invoked to resolve
278281
the conflict.
279282
283+
The `enum` must yield tuples with two elements on enumeration,
284+
where the first element represents the key and the second the value.
285+
280286
## Examples
281287
282288
iex> d1 = dict_impl.new([a: 1, b: 2])

0 commit comments

Comments
 (0)