Scala 3, Programming Scala.
“normal” return is used to return -1. We never reach the -1 expression if break is called. The boundary and break mechanism is a better alternative to scala.util.control.NonLocalReturns and scala.util.control.Breaks which are deprecated as of Scala 3.3.0. The new mechanism is easier for developers