Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!csus.edu!ucdavis!csusac!usenet From: cs16011@athena.ecs.csus.edu Newsgroups: comp.lang.lisp.franz Subject: Re: Lisp Macros Message-ID: <1991May17.053812.18600@csusac.csus.edu> Date: 17 May 91 05:38:12 GMT References: <1991May15.203735.3850@csusac.csus.edu> Sender: usenet@csusac.csus.edu (News account (alt)) Organization: California State University, Sacramento Lines: 18 Thanks for all the information! Let me clarify my question a little bit. My instructor asks "whether macros can be recursive in Lisp and if so or not so, support one's answer". When I tried to tackle that question I thought that since macro expansion was a two-step process in which the first phase will build a template of "to-be-evaulated" code while the second phase will evaluate the code built, and also because the Lisp interpreter will try to expand the first element of the built code further if it is a macro name (or if it is just a regular Lisp primitive then the code will be evaulated and the result returned), then it seems logical that I can have recursive macros merely by controlling how the "to-be-evaluated" code is composed during phase one. On the other hand, my instructor thinks that recursive macros will have the problem of unable to exit but keep on expanding forever. Other than this idea, he has not provided any concrete evidence that it cannot be done. I have not contrived any recursive macros before and think it be more appropriate to learn from worldwide Lisp experts here. Can macros have double recursion or just single tail recursion or NO recursion at all?