sub mapnz (&@) { my ( $callback, $n ) = splice @_, 0, 2; push @_, ( undef ) x ( -@_ % $n ); map $callback->( splice @_, 0, $n ), 0 .. @_ / $n - 1; }