Skip to content

clojure.core/zipmap

View this page on ClojureDocs

Type: function Added: Clojure 1.0 Examples: 8 Runnable: 7
([keys vals])

Returns a map with the keys mapped to the corresponding vals.

Examples

by nipra on
by devn on
by edbedbe on . May have evaluation errors.
by tecigo on
by d-lord on
by timgilbert on
by zyxmn-rvu on
by stindrago on

Note by seeeturtle

zipmap always leave last key & val if keys are duplicated like the last example code.

You can know them from source code which assoc key & val to result map in left-to-right order.

See also


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