in reply to map2 {} grep2 {} ...
Define them yourself:
sub map2(&@){ my $code = shift; map $code->( shift, shift ), 0 .. $#_/2 } sub grep2(&@){ my $code = shift; map{ my @pair = (shift,shift); $code->( @pair ) ? @pair : () } 0 .. $#_/2 }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: map2 {} grep2 {} ...
by jozef (Sexton) on Jul 14, 2011 at 13:56 UTC | |
Re^2: map2 {} grep2 {} ...
by locked_user sundialsvc4 (Abbot) on Jul 14, 2011 at 15:37 UTC |