diff options
-rw-r--r-- | lib/elixir/lib/enum.ex | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/elixir/lib/enum.ex b/lib/elixir/lib/enum.ex index 03c079f54..04162f8d3 100644 --- a/lib/elixir/lib/enum.ex +++ b/lib/elixir/lib/enum.ex @@ -38,21 +38,21 @@ defprotocol Enumerable do """ @typedoc """ - An enumerable of values with type `value`. + An enumerable of elements of type `element`. This type is equivalent to `t:t/0` but is especially useful for documentation. - For example, imagine I define a function that expects an enumerable of + For example, imagine you define a function that expects an enumerable of integers and returns an enumerable of strings: - @spec ints_to_strings(Enumerable.t(integer())) :: Enumerable.t(String.t()) - def ints_to_strings(ints) do - Stream.map(ints, &Integer.to_string/1) + @spec integers_to_strings(Enumerable.t(integer())) :: Enumerable.t(String.t()) + def integers_to_strings(integers) do + Stream.map(integers, &Integer.to_string/1) end """ @typedoc since: "1.14.0" - @type t(_value) :: t() + @type t(_element) :: t() @typedoc """ The accumulator value for each step. |