Skip to content

Instantly share code, notes, and snippets.

@zaiste zaiste/destruct.clj
Last active Aug 29, 2015

Embed
What would you like to do?
;; works
(let [{a :a b :b} {:a 1 :b 2}]
a)
;; doesn't work
(let [(zipmap (map #(symbol (name %)) [:a :b]) [:a :b])
{:a 1 :b 2}]
a)
;; doesn't work
(let [{:keys (vec (map #(symbol (name %)) [:a :b]))}
{:a 1 :b 2}]
a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.