On Tue, Apr 12, 2005 at 12:30:42AM -0600, Luke Palmer wrote:
> But in Perl 6:
> 
>     my @a = (1,2,3,4);
>     my @b = @a[1...];  # elements from 1 onward
>     say [EMAIL PROTECTED];   # should probably be 3, but with Perl 5 
> semantics is Inf

In Pugs (r1847), after the IType refactoring, I have allowed
infinite slicing of arrays to simply mean "slice until the end". 

That is:

    @b = @a[1...];      # elements from 1 onward
    @b = @a[1..Inf];    # same thing

I think that's far more more intuitive and convenient.

Thanks,
/Autrijus/

Attachment: pgpJeoZ9nKnM7.pgp
Description: PGP signature

Reply via email to