To use alternative 1, you need ~lineseq in your eval: (eval `(def ~(symbol varname) ~lineseq))
If you don't unquote lineseq like this, then you are def'ing "cards" to the *symbol* lineseq. When you later access "cards", it is evaluated to returns the symbol lineseq. But since lineseq was a local, it is no longer in scope. What you actually wanted was to def "cards" to the value of lineseq (which is what the unquote ~ does). marc On Mon, Apr 7, 2014 at 7:08 AM, Peter West <peter.b.w...@gmail.com> wrote: > (eval `(def ~(symbol varname) lineseq)) > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.