Hi Hunter, however, in this way you are expanding the application of the macro "symbol-macrolet" (which is itself a macro), not just the symbol macro "b":
(pprint (mexpand-1 '(symbol-macrolet [b (+ 1 2)] b ["something" "else"]))) ;; (do (+ 1 2) ["something" "else"]) ;; nil cheers, Gianluca On Monday, December 7, 2015 at 5:09:44 PM UTC+1, retnuH wrote: > > This worked for me (after some experimentation): > > (pprint (mexpand-1 '(symbol-macrolet [b (+ 1 2)] b))) > > ;; (do (+ 1 2)) > ;; nil > > > Cheers, > > H > > On Saturday, 5 December 2015 07:45:38 UTC, Ritchie Cai wrote: >> >> I'm not sure how to print a macroexpand on macros that defined in >> macrolet or symbol-macrolet. >> >> with normal macros, I can do: >> >> (defmacro test-macro [] '(+ 1 2)) >> (pprint (macroexpand-1 '(test-macro))) >> >> ;; (+ 1 2) >> ;; nil >> >> but with macrolet or symbol-macrolet: >> >> (symbol-macrolet [(b [] '(+ 1 2))] >> (pprint (mexpand-1 '(b)))) >> >> ;; (b) >> ;; nil >> >> (symbol-macrolet [(b [] '(+ 1 2))] >> (pprint (mexpand-1 (b)))) >> >> ;; 3 >> ;; nil >> >> what am I doing wrong? >> >> Thanks >> Ritchie >> >> -- 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.