key

added
1.0

ns
clojure.core

type
function

(key e)

Returns the key of the map entry.

                ;; the following emulates 'keys'
(map key {:a 1 :b 2})
;;=> (:a :b)

            
                ;; extracts the key of a map entry
(key (clojure.lang.MapEntry. :a :b))
;;=> :a