[EMAIL PROTECTED] (Thomas A. Russ) writes:
>> >(defun addn (n)
>> > #'(lambda (x)
>> > (+ x n)))
>>
>> The same as
>> def addn(n):
>> def fn(x):
>> return n + x
>> return fn
>
> Is this really equivalent?
>
> What happens if you call addn more than once with different
> parameters. Will you get different functions that you can
> use simultaneously?
Yes.
It also behaves correctly when a variable it refers to is later
mutated.
--
__("< Marcin Kowalczyk
\__/ [EMAIL PROTECTED]
^^ http://qrnik.knm.org.pl/~qrczak/
--
http://mail.python.org/mailman/listinfo/python-list