Perl 6 More laziness and lists #37

Slicing and autotrim

Why the inconsistency? Several reasons, but a big one is using a slice as a lvalue:

@words[3..7] = @more;   # should extend @words if needed
@words[3..*] = @more;   # only replace existing elements

Use some future syntactic construct to force a list to autotrim:

@words[3..7,*]     # elements 3 through 7, autotrimmed
Copyright © 2012
http://www.pmichaud.com/2012/pres/