Re: destructing a map with a vector of keys?

2012-01-13 Thread Cedric Greevey
On Fri, Jan 13, 2012 at 7:49 PM, Andrew Xue wrote: > trying do something like this > > (def my-keys [a b c]) > > (defn my-func [m] (let [{:keys my-keys} m] (prn a b c))) > > (my-func {:a 1 :b 2 :c 3}) > > > tried '[a b c], ['a 'b 'c], and ["a" "b" "c"] for my-keys but they all > give a Don't know

destructing a map with a vector of keys?

2012-01-13 Thread Andrew Xue
trying do something like this (def my-keys [a b c]) (defn my-func [m] (let [{:keys my-keys} m] (prn a b c))) (my-func {:a 1 :b 2 :c 3}) tried '[a b c], ['a 'b 'c], and ["a" "b" "c"] for my-keys but they all give a Don't know how to create ISeq from: clojure.lang.Symbol error thanks andy --