Subject: Re: iterative <-> recursive programming
From: (Rob Warnock)
Date: 23 Dec 2000 05:21:31 GMT
Newsgroups: comp.lang.scheme
Message-ID: <921cor$fro7u$>
Joe Marshall  <> wrote:
| "KLH" <> writes:
| > What makes it tail recursive?
| That's actually pretty tricky to explain concisely.

Yes, though R5RS section "3.5 Proper tail recursion" does a reasonable job:


It defines the notion of a "tail context", and then inductively enumerates
the tail contexts of an expression that is in a tail context. For example,
if "(if foo bar baz)" is in a tail context, then "bar" and "baz" are in
tail contexts, but "foo" is not. And so on.


Rob Warnock, 31-2-510
Network Engineering
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		PP-ASEL-IA
Mountain View, CA  94043