From bcebc5984d0092479e4d5ca43acf51ff8b2295af Mon Sep 17 00:00:00 2001 From: Eksperimental Date: Wed, 22 Dec 2021 16:26:28 +0000 Subject: Streamline t:Enumerable.t/1 docs (#11517) --- lib/elixir/lib/enum.ex | 12 ++++++------ 1 file 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. -- cgit v1.2.1