sub my_map (&@) { my $sub = shift; my @out; push @out, $sub->() for @_; return @out; }