4 ms·
I'd write the scala example as names zip ages foreach { (name, age) => println(name + ": " + age) } which, imho, is a little easier on the eyes. [edi
by timrod 15y ago
I'd write the scala example as
names zip ages foreach { (name, age) =>
println(name + ": " + age)
}
which, imho, is a little easier on the eyes.
[edit: fix syntax]
- jules 15y agoHow does Scala figure out the precedence on that? And in general what does `word1 word2 ... wordN` mean?