Iterating lists
Use for to iterate over things that provide iterators
Each item is passed to the block
my @suits = <Clubs Diamonds Hearts Spades>; for @suits { say $_; }continued...
Perl 6 | Cool Perl 6 | #16 |
Use for to iterate over things that provide iterators
Each item is passed to the block
my @suits = <Clubs Diamonds Hearts Spades>; for @suits { say $_; }continued...
Copyright © 2010 http://www.pmichaud.com/2010/pres/ |