As in the below (which doesn't work).
(defmacro def-dispatcher-test [test-name state command & body] `(deftest ~test-name (let [session (test-session ~state)] (dispatcher ~command session) ~...@body))) (def-dispatcher-test user-test :authorization "USER bugs" (is (= (:user @session) "bugs")) (is (= (get-one session) "+OK Hello bugs\n"))) On Nov 8, 9:59 am, Miki <miki.teb...@gmail.com> wrote: > Hello Sunil, > > > Just to elaborate on what I said before, session# creates a new symbol > > using gensym with a prefix session. It avoids accidental variable capture. > > Thanks for the quick reply. However I *do* want the symbol name to be > "session" since the > code in "body" uses it. > > All the best, > -- > Miki -- 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