Super useful, now that I've matured in my appreciation for functional list processing thanks to map and grep and List::Util. Stolen and added to my toolkit.
Note that my $val = $block->($_) might as well be my $val = $block->(). The value is still available to the block via $_ because for loops localize with dynamic scope.
In reply to Re: argmin & argmax
by eritain
in thread argmin & argmax
by blokhead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |