- or download this
# this function is not recursive; it is called once
# and returns with the subroutine calls it /would have/
...
execute sub ref, $x = $sub->();
push subs returned by get_sub(param1,...,paramN) onto @callstack;
end while
- or download this
...
return sub { my $arg1 = shift; my $arg2 = shift; ... ;};
...
- or download this
my @subrefs = ();
# loop, push sub refs onto @subrefs
...
...
return { subref => @subrefs, val1 => 1, val2 => 'abc' };
...
- or download this
# make call
my $caller = get_sub(...);
...
my @subrefs = @{$caller->{subrefs}};
# push returned subs onto call stack
push(@callstack,@subrefs);
- or download this
#!/usr/bin/env perl
use strict;
...
last;
}
}
- or download this
PRE: abc&(def)*
Acyclic:
...
defdefdefdefdeabfdefdcefdefdef
defdefdefdefdeabfdefdcefdefdefdef
defdefdefdefdeabfdefdcefdefdefdefdef
- or download this
sub get_acyclic_sub {
my $self = shift;
...
my $self = shift;
return $self->init_acyclic_iterator();
}