writing recursive lambda functions // Thank You
Thorsten Rühl
ask_me at gmx.de
Wed Dec 24 10:11:40 EST 2003
Am Wed, 24 Dec 2003 12:33:46 +0000 schrieb JCM:
>> def mapp(f):
>> lambda l: l and cons(f(car(l)),(mapp(f)(cdr(l))))
>
> You're missing a return here:
>
> def mapp(f):
> return lambda l: l and cons(f(car(l)),(mapp(f)(cdr(l))))
>
> A common mistake if you're coming from lisp (I do it all the time).
Thanks to you both for you´re quick answer...
.. hehe obviosly an beginners mistake ;)
Thank you for yur help !!!! :))))
CU
Thorsten
More information about the Python-list
mailing list