Skip to content

Instantly share code, notes, and snippets.

@zelark
Created May 25, 2018 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zelark/2feae9824baa6cd25f9a8e9ddf9a23f5 to your computer and use it in GitHub Desktop.
Save zelark/2feae9824baa6cd25f9a8e9ddf9a23f5 to your computer and use it in GitHub Desktop.
;; http://www.4clojure.com/problem/solutions/61
(fn [ks vs] (reduce (fn [m [k v]] (assoc m k v)) {} (map vector ks vs)))
(fn [ks vs] (apply assoc {} (mapcat vector ks vs)))
(fn [ks vs] (apply assoc {} (interleave ks vs)))
(fn [ks vs] (apply hash-map (interleave ks vs)))
#(apply hash-map (interleave %1 %2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment