Perl 6 Perl 6 today #33

The zip (Z) operator

Th Z operator does pairwise combinations of elements from two or more lists:

> my @first = <Larry    Damian Audrey  Randal>
> my @last  = <Wall     Conway Tang    Schwartz>
> my @nick  = <TimToady conway audreyt merlyn>

> for @first Z @last { say "$^b, $^a"; }
Wall, Larry
Conway, Damian
Tang, Audrey
Schwartz, Randal
continued...
Copyright © 2009
http://www.pmichaud.com/2009/pres/