A.Vector.sort

You're seeing just the function sort, go back to A.Vector module for more information.

Specs

sort(t(val)) :: t(val) when val: value()

Sorts the vector in the same way as Enum.sort/1.

Examples

iex> A.Vector.new(9..1) |> A.Vector.sort()
vec([1, 2, 3, 4, 5, 6, 7, 8, 9])

Specs

sort(
  t(val),
  (val, val -> boolean()) | :asc | :desc | module() | {:asc | :desc, module()}
) :: t(val)
when val: value()

Sorts the vector in the same way as Enum.sort/2.

See Enum.sort/2 documentation for detailled usage.

Examples

iex> A.Vector.new(1..9) |> A.Vector.sort(:desc)
vec([9, 8, 7, 6, 5, 4, 3, 2, 1])