Skip to content

Commit a4a23b9

Browse files
committed
Fix Enum.traverse deprecated warning doctest
1 parent 2f83ea5 commit a4a23b9

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

lib/elixir/lib/collectable.ex

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ defprotocol Collectable do
88
iex> Enum.into([a: 1, b: 2], %{})
99
%{a: 1, b: 2}
1010
11-
If a collection implements both `Enumerable` and `Collectable`, both
12-
operations can be combined with `Enum.traverse/2`:
13-
14-
iex> Enum.traverse(%{a: 1, b: 2}, fn {k, v} -> {k, v * 2} end)
15-
%{a: 2, b: 4}
16-
1711
## Why Collectable?
1812
1913
The `Enumerable` protocol is useful to take values out of a collection.
@@ -32,10 +26,6 @@ defprotocol Collectable do
3226
`into/1` can be seen as the opposite of `Enumerable.reduce/3`. If
3327
`Enumerable` is about taking values out, `Collectable.into/1` is about
3428
collecting those values into a structure.
35-
36-
`empty/1` receives a collectable and returns an empty version of the
37-
same collectable. By combining the enumerable functionality with `into/1`
38-
and `empty/1`, one can, for example, implement a traversal mechanism.
3929
"""
4030

4131
@type command :: {:cont, term} | :done | :halt

0 commit comments

Comments
 (0)