Skip to content

ReverseSort

Status: Stable

documented, exercised by the test suite and/or worked examples, with no known limitations recorded.

Description

ReverseSort[list]

Sorts into descending order (Reverse of Sort). Over an association, sorts the entries by value, descending.

Examples (2)

Every input below was run against the current Mathilda build and its output recorded.

Basic examples (2)

In[1]:= ReverseSort[{3, 1, 4, 1, 5, 9, 2}]
Out[1]= {9, 5, 4, 3, 2, 1, 1}

In[2]:= ReverseSort[<|"a" -> 3, "b" -> 1, "c" -> 2|>]
Out[2]= <|"a" -> 3, "c" -> 2, "b" -> 1|>

Implementation notes

Attributes: Protected.

References

See also: ReverseSortBy, Sort