Perl 6 Perl 6 Lists, Arrays, and Hashes vivified #30

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 © 2011
http://www.pmichaud.com/2011/pres/