Definição
Scala não tem break nem continue nativos. Use métodos de coleção (find, exists, takeWhile), boundary/break no Scala 3 ou Breaks no Scala 2.
Exemplos
1. Com coleções (preferido)
val first = files.find(_.endsWith(".parquet"))
val hasNegative = orders.exists(_.amount < 0)
val prefix = rows.takeWhile(_.valid)2. Scala 3: boundary / break
import scala.util.boundary, boundary.break
val found = boundary {
for (f <- files) if (f.endsWith(".parquet")) break(Some(f))
None
}3. Scala 2: Breaks
import scala.util.control.Breaks._
breakable {
for (f <- files) if (f.endsWith(".parquet")) { println(f); break }
}