Perl 6 Perl 6 Lists and Arrays vivified #31

Infinite arrays

Arrays can therefore be infinite

> my @a = 100..Inf;
> say @a[10];
110
> say @a[15..20]
115 116 117 118 119 120

Can still do shift/unshift operations

> @a.unshift('hello', 'world'); say @a[0..4];
hello world 100 101 102

> say @a.elems;
Inf
Copyright © 2012
http://www.pmichaud.com/2012/pres/