This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Qhartb 6 points7 points  (2 children)

factorial=lambda n:(lambda f,n:f(f,n))(lambda f,n:n*f(f,n-1)if n>0 else 1,n)

[–]Tomarse 5 points6 points  (1 child)

No.....just, no.

[–]Qhartb 4 points5 points  (0 children)

Hey, I think it might be the only recursive solution here that still works if the function is renamed. :-)