@@ -2223,19 +2223,17 @@ defmodule Enum do
22232223
22242224 ## Examples
22252225
2226- The examples below use the `:exrop` pseudorandom algorithm since it's
2227- the default from Erlang/OTP 20, however if you are using Erlang/OTP 22
2228- or above then `:exsss` is the default algorithm. If you are using `:exsplus`,
2229- then please update, as this algorithm is deprecated since Erlang/OTP 20.
2226+ The examples below use the `:exsss` pseudorandom algorithm since it's
2227+ the default from Erlang/OTP 22:
22302228
22312229 # Although not necessary, let's seed the random algorithm
2232- iex> :rand.seed(:exrop, {101, 102, 103})
2233- iex> Enum.random([1, 2, 3])
2234- 3
2230+ iex> :rand.seed(:exsss, {100, 101, 102})
22352231 iex> Enum.random([1, 2, 3])
22362232 2
2233+ iex> Enum.random([1, 2, 3])
2234+ 1
22372235 iex> Enum.random(1..1_000)
2238- 846
2236+ 309
22392237
22402238 """
22412239 @ spec random ( t ) :: element
@@ -2551,17 +2549,15 @@ defmodule Enum do
25512549
25522550 ## Examples
25532551
2554- The examples below use the `:exrop` pseudorandom algorithm since it's
2555- the default from Erlang/OTP 20, however if you are using Erlang/OTP 22
2556- or above then `:exsss` is the default algorithm. If you are using `:exsplus`,
2557- then please update, as this algorithm is deprecated since Erlang/OTP 20.
2552+ The examples below use the `:exsss` pseudorandom algorithm since it's
2553+ the default from Erlang/OTP 22:
25582554
25592555 # Although not necessary, let's seed the random algorithm
2560- iex> :rand.seed(:exrop , {1, 2, 3})
2556+ iex> :rand.seed(:exsss , {1, 2, 3})
25612557 iex> Enum.shuffle([1, 2, 3])
2562- [3, 1, 2 ]
2558+ [3, 2, 1 ]
25632559 iex> Enum.shuffle([1, 2, 3])
2564- [1, 3, 2 ]
2560+ [2, 1, 3 ]
25652561
25662562 """
25672563 @ spec shuffle ( t ) :: list
@@ -3148,11 +3144,11 @@ defmodule Enum do
31483144 ## Examples
31493145
31503146 # Although not necessary, let's seed the random algorithm
3151- iex> :rand.seed(:exrop , {1, 2, 3})
3147+ iex> :rand.seed(:exsss , {1, 2, 3})
31523148 iex> Enum.take_random(1..10, 2)
3153- [7, 2 ]
3149+ [3, 1 ]
31543150 iex> Enum.take_random(?a..?z, 5)
3155- 'hypnt '
3151+ 'mikel '
31563152
31573153 """
31583154 @ spec take_random ( t , non_neg_integer ) :: list
0 commit comments