summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEksperimental <eksperimental@autistici.org>2021-12-22 16:26:28 +0000
committerGitHub <noreply@github.com>2021-12-22 17:26:28 +0100
commitbcebc5984d0092479e4d5ca43acf51ff8b2295af (patch)
treeeb5fd393ec591138d8bfaa28728da710e361af6c
parenta67ed562672a68fe884587cdf42e9538af2447e8 (diff)
downloadelixir-bcebc5984d0092479e4d5ca43acf51ff8b2295af.tar.gz
Streamline t:Enumerable.t/1 docs (#11517)
-rw-r--r--lib/elixir/lib/enum.ex12
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.