my @multislice = ([1,2], [3,4, 5]);
my @dims = map :shallow {+@$_} @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
> When you call map on a multislice, does it do deep or shallow
> iteration?
And with deep, there is the choice: depth first or not.
--
Affijn, Ruud
"Gewoon is een tijger."