When you call map on a multislice, does it do deep or shallow iteration? I can see uses for both of these:

my @multislice = ([1,2], [3,4, 5]);

my @dims = map :shallow [EMAIL PROTECTED] @multislice; # Want (2, 3)
my @changed_slice = map :deep {2 * $_ + 1} @multislice; # Want ([3, 5], [7, 9, 11])

Obviously both should be possible, and if we have a multislice with more than 2 dimensions we should be able to iterate at any level. So what is the default iteration level and how do we override?

Joe Gottman

Joe Gottman

Reply via email to