min-key

functionsince v0.0-927 clojure.core/min-keyEdit
(min-key k x)
(min-key k x y)
(min-key k x y & more)

Details:

Returns the x for which (k x) is least.

(k x) should return a number.


See Also:


Source docstring:
Returns the x for which (k x), a number, is least.

If there are multiple such xs, the last one is returned.
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn min-key
  ([k x] x)
  ([k x y] (if (< (k x) (k y)) x y))
  ([k x y & more]
     (reduce #(min-key k %1 %2) (min-key k x y) more)))