From ... Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!129.240.148.23!uio.no!Norway.EU.net!127.0.0.1!nobody From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: how does recursion work? Date: 16 Oct 2000 00:25:01 +0000 Organization: Naggum Software; vox: +47 800 35477; gsm: +47 93 256 360; fax: +47 93 270 868; http://naggum.no; http://naggum.net Lines: 37 Message-ID: <3180644701864385@naggum.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: oslo-nntp.eunet.no 971656141 4856 195.0.192.66 (16 Oct 2000 00:29:01 GMT) X-Complaints-To: newsmaster@eunet.no NNTP-Posting-Date: 16 Oct 2000 00:29:01 GMT mail-copies-to: never User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Xref: supernews.google.com comp.lang.lisp:2232 * Xenophon Fenderson the Carbon(d)ated | Basically, as far as the translator is concerned (it's much the same | for compilers as for interpreters), it sees your function as follows: | | (FUNCTION-OF-N-ARGUMENTS | :arg-names-list ("M" "N") | :body ((IF-FORM | :test (FUNCTION-CALL | :func-name "ZEROP" | :arg-list ((VARIABLE-REFERENCE :symbol-name "M"))) | :then-clause (INTEGER-LITERAL :value 1) | :else-clause (FUNCTION-CALL | :func-name "*" | :arg-list ((VARIABLE-REFERENCE :symbol-name "M") | (FUNCTION-CALL | :func-name "RECUR-EXPT" | :arg-list ((VARIABLE-REFERENCE :symbol-name "M") | (FUNCTION-CALL | :func-name "-" | :arg-list ((VARIABLE-REFERENCE :symbol-name "N") | (INTEGER-LITERAL :value 1)))))))))) | | This is called an "abstract syntax tree" and in mentioned in greater | detail in the texts to which I refer you. Which (Common) Lisp implementation did you dig this stuff out of? If you made it up on the spot, and it looks like you did because you missed the fundamental idea in (Common) Lisp that symbols are not named in some silly "abstract syntax trees" by their _string_ names, would you apologize to the poor sap you lied to and retract it all? #:Erik -- I agree with everything you say, but I would attack to death your right to say it. -- Tom Stoppard