David Christensen wrote:
I definitely like the hyper stuff how it is; maybe the answer is to
just define an infix:[[]] operator which returns the crosswise slice
of a nested list of lists. In any case it could be shunted aside to
some package and certainly does not need to be in core.
Didn't
Quick thought ---
Does the current design of Perl 6's hyper operators allow for
hyper-slices? I.e., if I want to model a matrix by using a list of
lists, is the following code valid/useful?
my @matrix=([1,2,3],[4,5,6],[7,8,9]);
my @row = @matrix[0]; # first row
my @col = @matrix[0]; #first
David Christensen writes:
Quick thought ---
Does the current design of Perl 6's hyper operators allow for
hyper-slices? I.e., if I want to model a matrix by using a list of
lists, is the following code valid/useful?
my @matrix=([1,2,3],[4,5,6],[7,8,9]);
my @row = @matrix[0]; # first
I definitely like the hyper stuff how it is; maybe the answer is to
just define an infix:[[]] operator which returns the crosswise slice
of a nested list of lists. In any case it could be shunted aside to
some package and certainly does not need to be in core.
David
my @transposed =