O
Olivier Renaud
Hi,
I wrote a method which uses recursion, internally. As a test, I tried to
define the recursive function inside the method that is called :
class Ga
def bu
def zo(n)
# recursively call zo
end
10.times {|n| zo(n)}
end
At my surprise, this code ran well ! But I wonder if this is a good idea...
Should I be aware of possible problems, or limitations, coming from this
kind of construction ? I can't figure out where the zo function
actually "lives".
Thanks.
I wrote a method which uses recursion, internally. As a test, I tried to
define the recursive function inside the method that is called :
class Ga
def bu
def zo(n)
# recursively call zo
end
10.times {|n| zo(n)}
end
At my surprise, this code ran well ! But I wonder if this is a good idea...
Should I be aware of possible problems, or limitations, coming from this
kind of construction ? I can't figure out where the zo function
actually "lives".
Thanks.