On Thu, Nov 20, 2008 at 3:32 PM, Simon Brooke <[EMAIL PROTECTED]> wrote: > On Nov 20, 12:19 pm, Jarkko Oranen <[EMAIL PROTECTED]> wrote: [...] >> I'm not a macro expert myself, but I hope this will help you and >> others as well. >> It's good to spend some time simply writing macros and using >> 'macroexpand to see what kind of code they produce. I don't think >> there is any other way to learn to write macros. > > A point about using macroexpand which I stumbled badly on yesterday is > that macroexpand expands the macros your macro expands into. Well, of > course it does. But it's been so long since I was learning a new macro > syntax that I'd forgotten this. And when my rather simple macro > expanded into a mess of let* and ifs I found myself staring blankly at > it wondering what the heck I'd done wrong.
Try macroexpand-1 instead. -- Michael Wood <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---