Scala 3, Programming Scala.
break(i) -1 This is one way to return the index for an element found in a collection or -1 if not found. The boundary defines the scope where a non-local return may be invoked. If the desired element elem is found, then we call break to return the index. This breaks out of the for comprehension,