Function: -grade-up
-grade-up is a byte-compiled function defined in dash.el.
Signature
(-grade-up 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 ascending order.
Source Code
;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -grade-up (comparator list)
"Grade elements of LIST using COMPARATOR relation.
This yields a permutation vector such that applying this
permutation to LIST sorts it in ascending order."
(declare (important-return-value t))
(->> (--map-indexed (cons it it-index) list)
(-sort (lambda (it other) (funcall comparator (car it) (car other))))
(mapcar #'cdr)))