Subject: Re: what flet doesn't work here??
From: (Rob Warnock)
Date: Sat, 23 Dec 2006 03:58:20 -0600
Newsgroups: comp.lang.lisp
Message-ID: <> <> wrote:
| Michal Krupka �g�D�G
| > (flet ((b () "a2")) (b))
| > is better
| I see, but what I want is replacing the current definition of a
| pre-defined function, that's why I use flet with a.

In ANSI CL[1], functions are scoped lexically, not dynamically.


[1] Yes, I am aware of the thread on "dynamically scoped functions"
    and "DFLET" we had here several years ago [Google should have it,
    start with <>],
    but many of the proposals for adding dynamically scoped functions
    discussed there required that the functions to be shadowed be
    defined originally with some idiosyncratic macro, *not* CL:DEFUN.
    And it certainly wouldn't work to shadow some function that had
    been compiled (with CL:DEFUN) in a separate compilation unit,
    since it might have been silently inlined in various places.

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