A.Vector.shuffle
You're seeing just the function
shuffle
, go back to A.Vector module for more information.
Specs
Returns a new vector with the elements of vector
shuffled.
See Enum.shuffle/1
for notes on implementation and random seed.
Examples
# Although not necessary, let's seed the random algorithm
iex> :rand.seed(:exrop, {1, 2, 3})
iex> A.Vector.new([1, 2, 3]) |> A.Vector.shuffle()
vec([3, 1, 2])
iex> A.Vector.new([1, 2, 3]) |> A.Vector.shuffle()
vec([1, 3, 2])