Subject: Re: What's the point of flet?
From: Erik Naggum <>
Date: Wed, 31 Oct 2001 22:01:34 GMT
Newsgroups: comp.lang.lisp
Message-ID: <>

* Vebjorn Ljosa <>
| But it also makes the parts impossible to test separately.

  You may simply need a better Common Lisp environment.

  Suppose you have this silly function:

(defun foo ()
  (flet ((bar () t))

  In Allegro CL, this defines two functions reachable with fdefinition: one
  named by the symbol foo, and one named by the list (flet foo bar).  That
  is, #'(flet foo bar) returns the inner function bar.  If this is not a
  closure, it is funcallable.

(funcall #'(flet foo bar))
=> t

  You can trace inner functions and use these function names in a number of
  interesting places.  I think this is a very useful and intelligent
  extension to the function name concept, given that it has to be supported
  for setf methods.

  Norway is now run by a priest from the fundamentalist Christian People's
  Party, the fifth largest party representing one eighth of the electorate.
  Carrying a Swiss Army pocket knife in Oslo, Norway, is a criminal offense.