Python syntax in Lisp and Scheme
Alexey Dejneka
adejneka at comail.ru
Wed Oct 15 15:03:32 EDT 2003
David Eppstein <eppstein at ics.uci.edu> writes:
> In article <tyfekxe32bi.fsf at pcepsft001.cern.ch>,
> Jacek Generowicz <jacek.generowicz at cern.ch> wrote:
>
> > > To clarify, by "unlike lisp" I meant only that defun doesn't nest
> >
> > ... and now you'll have to clarify what you mean by "defun doesn't
> > nest" ...
>
> The context of this was in accessing closures from function defs.
> Maybe you can call defun from within another function, but it won't give
> you a closure.
Really?
* (defun outer (x)
(defun inner ()
x))
OUTER
* (outer 3)
INNER
* (inner)
3
* (outer 11)
STYLE-WARNING: redefining INNER in DEFUN
INNER
* (inner)
11
--
Regards,
Alexey Dejneka
"Alas, the spheres of truth are less transparent than those of
illusion." -- L.E.J. Brouwer
More information about the Python-list
mailing list