Perl 6 Perl 6 Lists and Arrays vivified #35

Using .kv to avoid .elems and simplify indexing

The .kv method can be used to generate (index, value) pairs lazily:

> my @words = < orange lime cherry banana lemon >;

> for @words.kv -> $k, $v { say "$k: $v" }
0: orange
1: lime
2: cherry
3: banana
4: lemon
Copyright © 2012
http://www.pmichaud.com/2012/pres/