Skip to content

clojure.core/keys

View this page on ClojureDocs

Type: function Added: Clojure 1.0 Examples: 2 Runnable: 2
([map])

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

Examples

by pkolloch on
by gzmask on

Note by akhudek

Functions keys and vals return sequences such that

(= (zipmap (keys m) (vals m)) m)

Note by Jarzka

I noticed that the keys are not always returned in the same order. Usually they are, but not always.

Note by ac1dr3d

Map with 8 or more keys order are unexpected.

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.