Created
May 27, 2016 02:07
-
-
Save bpicolo/1944f5acab0c4361010abe4d53f0ec73 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn vec-to-map [k vect] | |
;; Given a key function, k, of 1 arg | |
;; create a mapping from key->item | |
;; for the items in a vector | |
(into {} (map (juxt k identity) vect))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment