in reply to Re: What is your Perl dialect?
in thread What is your Perl dialect?
Maybe I'm just dense, but when does the actual population of @inorder happen?sub recurse_inorder { my $self=shift; my @inorder; my $sub; $sub=sub{ my $node=shift; $sub->($node->left) if $node->left; push @inorder,$node->value; $sub->($node->right) if $node->right; }; return \@inorder; }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re2: What is your Perl dialect?
by demerphq (Chancellor) on Feb 14, 2003 at 18:18 UTC |