Lisp-likeness
Peter Lewerin
peter.lewerin at swipnet.se
Tue Mar 15 11:03:48 EST 2005
"Kay Schluehr" <kay.schluehr at gmx.net> wrote
> Maybe You can answer my question what this simple LISP function does ?
It obviously returns a function adding n to the function's parameter,
n being bound into the functions's closure during the call to ADDN.
It's simple and straightforward.
> This is correct LISP-syntax if You bear in mind LISPs powerwull macro
> language...
Actually, this suffices:
(defun addn (n)
(lambda (x)
(+ x n)))
And Lisp's "macro language" isn't involved at all here.
More information about the Python-list
mailing list