Subject: Re: how does recursion work?
From: Erik Naggum <>
Date: 16 Oct 2000 00:25:01 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* 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:
|  :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")
| 				   :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?
  I agree with everything you say, but I would
  attack to death your right to say it.
				-- Tom Stoppard