keys

added
1.0

ns
clojure.core

type
function

(keys map)

Returns a sequence of the map's keys, in the same order as (seq map).

                (keys {:keys :and, :some :values})
;;=> (:keys :some)

(keys {})
;;=> nil

(keys nil)
;;=> nil
            
                ;; although doc says it only takes a map, this still works:
(keys (filter (fn [[_ v]] (-> v :t)) {:a {:t true} :b {:t false} :c {:t true}}))
;;=> (:a :c)