Skip to content

Commit 4a405cc

Browse files
author
Peter Minten
committed
Add note to Enum to clarify what's returned
In particular clarify that infinite streams don't work with many of the functions.
1 parent d4efc7b commit 4a405cc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/elixir/lib/enum.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ defmodule Enum do
6363
Depending on the type of the collection, the user-provided function will
6464
accept a certain type of argument. For dicts, the argument is always a
6565
`{ key, value }` tuple.
66+
67+
Note that all functions that return a collection return a list regardless of
68+
what the type of the input collection was and that many functions will not
69+
work with infinite streams.
6670
"""
6771

6872
@compile :inline_list_funcs

0 commit comments

Comments
 (0)