Subject: Re: tail recursion guidelines
From: (Rob Warnock)
Date: Sun, 19 Oct 2003 22:27:02 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Joe Marshall  <> wrote:
| Pascal Costanza <> writes:
| > that an implementation of the language isn't actually required
| > to do extensive program analysis to determine all instances of tail
| > recursion. ...
| Right.  It only needs to find the `obvious' ones.

Specifically, it only needs to find the specific (sub)expressions
required by R5RS "3.5 Proper tail recursion":


Though as it says there, an implementation *may* do more:

	Note: Implementations are allowed, but not required, to recognize
	that some non-tail calls, such as the call to H above, can be
	evaluated as though they were tail calls. In the example above,
	the LET expression could be compiled as a tail call to H.


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607