in reply to Re: list reversal closure
in thread list reversal closure

Using your iterator, but with a slightly different invocation:
my $foo = reverse_iterator("a",undef,"c"); while (my ($elem) = $foo->()) { print( defined( $elem ) ? $elem : "undef" ); }