Index doesn't even make sense for most smart-match inputs, so it doesn't make sense for smart-matching in general.
This is probably what you want:
my @indexes = map { EXPR ~~ $a[$_] } 0..$#a;
In reply to Re: smartmatch and index
by ikegami
in thread smartmatch and index
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |