Scala Tutorialsを読む 17 Loops using while
http://scalatutorials.com/tour/interactive_tour_of_scala_loops_using_while.html
よし追いついた。今日は17のwhileを使ったループだ。
17 Loops using while
Scala doesn't have a "classic" equivalent to the imperative for loop construct that exists in c, Java, etc. For imperative "for" like loops, use while.
ScalaはclassicなcやJava等に存在するforループと同じような機能を持ちません。 命令的なforの様なループをするには、whileを使います。
Scala doesn't support (out of the box) the ++ and -- operators, use += 1 or -= 1 for the same effect.
Scalaは++や--オペレータはサポートしておらず(boxの外)、同じ効果のある+= 1か -=1を使います。