On Fri, Jan 13, 2012 at 7:49 PM, Andrew Xue <[email protected]> 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 how to create ISeq from: clojure.lang.Symbol error
>
> thanks
> andy

You'd need to use a macro that expands into the desired defn form,
rather than trying to pass in the keys at runtime. Or, manually
extract values from the map at the start of your function, if the keys
are not actually known at runtime.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to