Skip to content

Commit e95c527

Browse files
Remove zipping maps doctest
1 parent cf9e53a commit e95c527

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/elixir/lib/enum.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4037,10 +4037,10 @@ defmodule Enum do
40374037
key in the left map and the matching key in the right map, but there is no such
40384038
guarantee because map keys are not ordered! Consider the following:
40394039
4040-
iex> left = %{:a => 1, 1 => 3}
4041-
iex> right = %{:a => 1, :b => :c}
4042-
iex> Enum.zip(left, right)
4043-
[{{1, 3}, {:a, 1}}, {{:a, 1}, {:b, :c}}]
4040+
left = %{:a => 1, 1 => 3}
4041+
right = %{:a => 1, :b => :c}
4042+
Enum.zip(left, right)
4043+
#=> [{{1, 3}, {:a, 1}}, {{:a, 1}, {:b, :c}}]
40444044
40454045
As you can see `:a` does not get paired with `:a`. If this is what you want,
40464046
you should use `Map.merge/3`.

0 commit comments

Comments
 (0)