Loop over multiple arrays simultaneously: Difference between revisions
Loop over multiple arrays simultaneously (view source)
Revision as of 20:18, 17 October 2009
, 14 years agoAdded Perl 6.
m (→{{header|Tcl}}: Clarify) |
Underscore (talk | contribs) (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}}==
|