summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@plataformatec.com.br>2019-10-19 10:48:27 +0200
committerJosé Valim <jose.valim@plataformatec.com.br>2019-10-19 10:48:27 +0200
commitffea19d407a9fc600b399a90d498cbcbda8d19c3 (patch)
tree25efde32061bf0cd5f98c7b110a0afd1a437e78b
parent16ac0678cd4ea0a54a096b4f0bb2ed1ad0e90daf (diff)
downloadelixir-ffea19d407a9fc600b399a90d498cbcbda8d19c3.tar.gz
Add since annotationjv-enum-sort-revamp
-rw-r--r--lib/elixir/lib/enum.ex3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/elixir/lib/enum.ex b/lib/elixir/lib/enum.ex
index df6c24076..7056e5f79 100644
--- a/lib/elixir/lib/enum.ex
+++ b/lib/elixir/lib/enum.ex
@@ -2436,6 +2436,7 @@ defmodule Enum do
[3, 2, 1]
"""
+ @doc since: "1.10.0"
@spec sort_reverse(t) :: list
def sort_reverse(enumerable) do
sort(enumerable, &(&1 >= &2))
@@ -2492,6 +2493,7 @@ defmodule Enum do
[~D[2020-03-02], ~D[2019-06-06], ~D[2019-01-01]]
"""
+ @doc since: "1.10.0"
@spec sort_reverse(t, (element, element -> boolean)) :: list
def sort_reverse(enumerable, fun) do
sort(enumerable, to_sort_reverse_fun(fun))
@@ -2550,6 +2552,7 @@ defmodule Enum do
%{name: "Lovelace", birthday: ~D[1815-12-10]}
]
"""
+ @doc since: "1.10.0"
@spec sort_reverse_by(
t,
(element -> mapped_element),