[Armedbear-devel] Tail recursion

Vibhu Mohindra vibhu.mohindra at gmail.com
Thu Nov 20 19:54:28 UTC 2014

One idea I have is to use deftro (described below) instead of defun
for tail recursive functions. On TCO Lisps define deftro to just
be defun. On others define it to rewrite the body. It won't optimise
all tail calls, just those are self-recursive.


I haven't used this myself. But I might start, because it's not
ugly in the following sense. Writing a tail recursive function and
depending implicitly on TCO is non-portable. deftro is a portability

Armedbear-devel mailing list
Armedbear-devel at common-lisp.net

More information about the armedbear-devel mailing list