Subject: | reimplementation of sub after |
sub after (&@) {
my $test = shift;
my $started;
my $lag;
grep $started ||= do {
my $x = $lag;
$lag = $test->();
$x
}, @_;
}
could be replaced by
sub after (&@) {
my $test = shift;
my $started;
grep $started || do {
my $previous = $started;
$started++ if $test->();
$previous
}, @_;
}