RosettaCodeData/Task/Loop-over-multiple-arrays-simultaneously/Elena/loop-over-multiple-arrays-simultaneously-2.elena

17 lines
422 B
Text
Raw Permalink Normal View History

2017-09-23 10:01:46 +02:00
import system'routines.
import extensions.
2016-12-05 22:15:40 +01:00
2019-09-12 10:33:56 -07:00
public program
{
2020-02-17 23:21:07 -08:00
var a1 := new string[]::("a","b","c");
var a2 := new string[]::("A","B","C");
var a3 := new int[]::(1,2,3);
2019-09-12 10:33:56 -07:00
var zipped := a1.zipBy(a2,(first,second => first + second.toString() ))
.zipBy(a3, (first,second => first + second.toString() ));
2016-12-05 22:15:40 +01:00
2019-09-12 10:33:56 -07:00
zipped.forEach:(e)
{ console.writeLine:e };
2016-12-05 22:15:40 +01:00
2019-09-12 10:33:56 -07:00
console.readChar();
}