Sort in reverse order

From CodeCodex

Implementations[edit]

Erlang[edit]

reverse_sort(List) ->
    lists:reverse( lists:sort(List) ).

Java[edit]

Arrays.sort (myArray, Collections.reverseOrder());

Ruby[edit]

def reverse_sort(ary)
  ary.sort.reverse
end

Tcl[edit]

lsort -decreasing [list 7 6 9 2 3 1 ]