pocketpy/tests/42_closure_ex.py
blueloveTH 614abcdeea ...
2023-05-21 15:21:13 +08:00

8 lines
119 B
Python

def f(n):
def g(x):
if x==n:
return n
return g(x+1)
return g(0)
assert f(10) == 10