nested defs
Posted: Thu Oct 16, 2008 3:49 pm
Is it possible to use nested function?
That is something like this Python code:
I tried of course ma Cobra compiler seems to refuse....
That is something like this Python code:
- Code: Select all
def sqg(num):
def f():
return num + num
return f
sqg2 = sqg(2)
print sqg2()
I tried of course ma Cobra compiler seems to refuse....