Re: Array/list transformations.

2005-12-27 Thread Larry Wall
On Tue, Dec 27, 2005 at 01:13:10PM -0500, Rob Kinyon wrote: : On 12/27/05, Larry Wall <[EMAIL PROTECTED]> wrote: : > On Tue, Dec 27, 2005 at 12:10:45AM -0500, Rob Kinyon wrote: : > : Creating an array whose positions are aliases for positions in another : > : array can be useful. How about : > : :

Re: Array/list transformations.

2005-12-27 Thread Rob Kinyon
On 12/27/05, Larry Wall <[EMAIL PROTECTED]> wrote: > On Tue, Dec 27, 2005 at 12:10:45AM -0500, Rob Kinyon wrote: > : Creating an array whose positions are aliases for positions in another > : array can be useful. How about > : > : my @s := @a[0,2,4] is alias; > : > : @a[2] = 3; # @s[1] == 3

Re: Array/list transformations.

2005-12-26 Thread Larry Wall
On Tue, Dec 27, 2005 at 12:10:45AM -0500, Rob Kinyon wrote: : Creating an array whose positions are aliases for positions in another : array can be useful. How about : : my @s := @a[0,2,4] is alias; : : @a[2] = 3; # @s[1] == 3 : @s[1] = 4; # @a[2] == 4 : : The default slicing behavio

Re: Array/list transformations.

2005-12-26 Thread Rob Kinyon
On 12/22/05, Jonathan Scott Duff <[EMAIL PROTECTED]> wrote: > On Thu, Dec 22, 2005 at 04:47:21PM +0100, Michele Dondi wrote: > > Also I wonder if one will be able to push(), pop(), etc. array slices as > > well whole arrays. A' la > > > > my @a=qw/aa bb cc dd ee/; > > my $s=pop @a[0..2]; # or [0,2

Re: Array/list transformations.

2005-12-22 Thread Jonathan Scott Duff
On Thu, Dec 22, 2005 at 04:47:21PM +0100, Michele Dondi wrote: > This is not a substantial issue regarding Perl 6, but is more a minor > feature curiosity/meditation. It was inspired some time ago by this PM > node: > > http://perlmonks.org/?node_id=509310 > > I was wondering if in addition to

Array/list transformations.

2005-12-22 Thread Michele Dondi
This is not a substantial issue regarding Perl 6, but is more a minor feature curiosity/meditation. It was inspired some time ago by this PM node: http://perlmonks.org/?node_id=509310 I was wondering if in addition to push(), pop() etc. there could be be rot() and roll() methods that would ac