|
|
|
|
|
by bko
1992 days ago
|
|
I agree. My main problem is I don't want intermediary variables floating around. Especially something like "areas". If python localized variables to a blocked namespace, I wouldn't mind In scala: --- val widths = Seq(1,2,3) val heights = Seq(4,5,6) widths.zip(heights).foreach { case (w, h) => { val area = w * h
if (area > 10) {
println(s"Area: ${area}")
}
}}println(area) // error: not found: value area |
|