[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

defun semantics

Does defun add the function name to the lexical environment of
the body?  Should it?

For example, in

(defun revappend (a b)
  (if (null a)
      (revappend (cdr a) (cons (car a) b))))

is the tail recursion implementable as a simple GO, or must the
system consult the function cell of the symbol REVAPPEND?  I vote
for allowing the GO, i.e. adding REVAPPEND to the lexical
function environment, in effect, defining DEFUN in terms of
LABELS instead of LAMBDA.