I wrote the following code in Python:
func = lambda x : x * 2
func = lambda x : func(x)
func(6)
When I ran the code above, I got
RecursionError: maximum recursion depth exceeded in comparison
I think the reason maybe : when it runs, it looks like this :
func = lambda x : lambda x: lambda x: (bula bula ...)
But why shouldn't it be like this :
func = lambda x : lambda x : x * 2
Or any other reasons?