sub shortcutted(&) { my $sub = shift; sub { my @byval; my $nondestructive = defined wantarray; $sub->( $nondestructive ? ( @byval = @_ ? @_ : $_ ) : ( @_ ? @_ : $_ ) ); return $nondestructive ? @byval[ 0 .. $#byval ] : (); }; }