Re: FW: question about recursion (pseudo-code if helpful)

2009-05-21 Thread Aaron Hawryluk
Wouldn't this work? Not that I know off the top of my head, but I've used similar structures in the past (not for heavy calculation work mind you, mostly for lexical parsing loops...) our $answer = recursive_function (initial parameter list); sub recursive_function { my $answer; some

FW: question about recursion (pseudo-code if helpful)

2009-05-21 Thread Greg Aiken
our $global_answer; recursive_function (initial parameter list); sub recursive_function { some stuff to do; do we have answer? if yes { $main::global_answer = ... return; else recursive_function (refined parameter list);