Nested DEF
This file contains 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 pick-and-rename [col pick-map] | |
(def undefined-value (atom :undefined-value)) | |
(apply assoc | |
{} | |
(flatten | |
(filter (fn [[k v]] | |
(not (= v undefined-value))) | |
(map (fn [[k v]] | |
[v (get col k undefined-value)]) | |
pick-map))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment