Is there a do-until (postcondition) loop in Scala 2.8? -


an algorithm of mine better readable if use postcondition (do-until) loop instead of precondition (while) loop. there such feature in scala 2.8?

sure.

scala> var = 0 i: int#4363 = 0  scala> {      | println(i)      | += 1      | } while (i < 10) 0 1 2 3 4 5 6 7 8 9 res0: unit#3773 = () 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -