Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
8
Task/Loops-Do-while/Scala/loops-do-while-1.scala
Normal file
8
Task/Loops-Do-while/Scala/loops-do-while-1.scala
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
var (x, l) = (0, List[Int]())
|
||||
do {
|
||||
x += 1
|
||||
l :+= x // A new copy of this list with List(x) appended.
|
||||
} while (x % 6 != 0)
|
||||
l
|
||||
}.foreach(println(_))
|
||||
Loading…
Add table
Add a link
Reference in a new issue