Loop over multiple arrays simultaneously: Difference between revisions
Content added Content deleted
(Add lang example) |
(Improve lang example: Replace first array with array of char values & Remove trailing s from last line) |
||
Line 2,439:
=={{header|Lang}}==
<syntaxhighlight lang="lang">
$a $= [a
$b $= [A\e, B\e, C\e] # Text values
$c $= [1, 2, 3] # Int values
# Repeat loop
Line 2,458:
# Foreach function with combinator
fn.arrayForEach(fn.arrayZip($a, $b, $c), fn.combB(fn.println, fn.combC3(fn.arrayReduce, fn.concat, \e)))
</syntaxhighlight>
|