List.keysort
You're seeing just the function
keysort
, go back to List module for more information.
Specs
keysort([tuple()], non_neg_integer()) :: [tuple()]
Receives a list of tuples and sorts the elements
at position
of the tuples. The sort is stable.
Examples
iex> List.keysort([a: 5, b: 1, c: 3], 1)
[b: 1, c: 3, a: 5]
iex> List.keysort([a: 5, c: 1, b: 3], 0)
[a: 5, b: 3, c: 1]