In a for loop in my Scala code, i want to skip to the beginning of the loop and not execute following statements if a particular condition is true. In Java i can use ‘continue’ for doing this. But ‘continue’ does not seem to work in Scala.
So how can i skip to the beginning of my loop in a Scala program ?
Please Help
Thank You.
If you’re using Scala 2.7, from http://www.scala-lang.org/node/257
If you’re using Scala 2.8
Note that normally needing
breakandcontinuemeans that you aren’t being as functional as Scala would like you to be.