Re: My attempts in playing with tail-recursion in python

2013-08-28 Thread Thomas Baruchel
Le 28-08-2013, Thomas Baruchel a écrit : > The following functions are fully usable; I hope someone will enjoy using > them. > > If you are not interested by the explanations, just jump to the end of the > message and take my functions for using them. Despite the very short size

My attempts in playing with tail-recursion in python

2013-08-28 Thread Thomas Baruchel
it that way: def B(func): x = (lambda f: (lambda x: x(x))(lambda y: f(lambda *args: lambda: y(y)(*args(func) def wrapper(*args): out = x(*args) while '__call__' in dir(out): out = out() return out return wrapper tr2 = B(fac) tr2(5