Code you're trying to run:
Y = lambda f: (lambda x: x(x))(lambda x: f(lambda *args: x(x)(*args)))
almost_fac = lambda f: \
lambda n: \
1 if n==0 else n * f(n-1)
factorial = Y(almost_fac)
print factorial(6)
What does "real" Python output?
720
What does Skulpt output?
TypeError: Cannot read property 'tp$call' of undefined
Please provide any additional information.
the recursive Y function instead works fine :D
Y = lambda f: f(lambda x: Y(f)(x))
Y(almost_fac)(7)
correctly returns 5040
Original issue reported on code.google.com by berdario on 26 Oct 2011 at 11:38
Original issue reported on code.google.com by
berdario
on 26 Oct 2011 at 11:38