Function: -grade-down

-grade-down is a byte-compiled function defined in dash.el.

Signature

(-grade-down COMPARATOR LIST)

Documentation

Grade elements of LIST using COMPARATOR relation.

This yields a permutation vector such that applying this permutation to LIST sorts it in descending order.

View in manual

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -grade-down (comparator list)
  "Grade elements of LIST using COMPARATOR relation.
This yields a permutation vector such that applying this
permutation to LIST sorts it in descending order."
  (declare (important-return-value t))
  (->> (--map-indexed (cons it it-index) list)
       (-sort (lambda (it other) (funcall comparator (car other) (car it))))
       (mapcar #'cdr)))