Jump to content

Loop over multiple arrays simultaneously: Difference between revisions

Added Perl 6.
(Added Perl 6.)
Line 210:
print_newline()
) a1 ;;</lang>
 
=={{header|Perl 6}}==
{{works with|Rakudo|#21 "Seattle"}}
 
<lang perl6>for <a b c> Z <A B C> Z (1, 2, 3) -> $x, $y, $z {
say $x, $y, $z;
}</lang>
 
The <code>Z</code> operator stops emitting items as soon as the shortest input list is exhausted.
 
=={{header|PowerBASIC}}==
845

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.