Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Question about recursively generated iterators

by ikegami (Pope)
on Sep 21, 2007 at 15:52 UTC ( #640390=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub visit_preorder(&$) {
       my ($visitor, $node) = @_;
    ...
       &visit_preorder($visitor, $l) if defined $l;
       &visit_preorder($visitor, $r) if defined $r;
    }
    
  2. or download this
    sub visit_preorder {
       my ($node) = @_;
    ...
          sub { return visit_preorder($r) if defined $r; return; },
       );
    }
    
  3. or download this
    sub visit_preorder {
       my ($node) = @_;
    ...
          defined($r) ? sub { return visit_preorder($r); } : (),
       );
    }
    
  4. or download this
    sub make_iter {
       my $f = shift @_;
    ...
          return;
       };
    }
    
  5. or download this
    {
       #      a
    ...
       }
       print("\n");
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://640390]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-12-22 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (112 votes), past polls