All Questions
Tagged with control-structures scala
1 question
23
votes
2
answers
15k
views
Why does Scala have return but not break and continue
Scala does not have break or continue, so some loop behavior takes a bit more of thinking.
Ending a loop early requires tail recursion, exceptions, or scala.util.control.Breaks (which uses exceptions)...