Re: Hyper-slices?

2005-04-18 Thread Rod Adams
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

Hyper-slices?

2005-04-17 Thread David Christensen
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

Re: Hyper-slices?

2005-04-17 Thread Luke Palmer
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

Re: Hyper-slices?

2005-04-17 Thread David Christensen
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 =