sortedDescending method

List<E> sortedDescending()

Returns a new list with all elements sorted according to descending natural sort order.

Implementation

List<E> sortedDescending() {
  var list = toList();
  list.sort((a, b) => -(a as Comparable).compareTo(b));
  return list;
}