A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://scala-lang.org/api/3.x/scala/util/control/Breaks$.html below:

Breaks

scala.util.control.Breaks

See theBreaks companion class

An object that can be used for the break control abstraction.

Example usage:

import Breaks.{break, breakable}

breakable {
  for (...) {
    if (...) break
  }
}
Attributes
Companion
class
Source
Breaks.scala
Graph
Supertypes
Self type
Members list

Break from the dynamically closest enclosing breakable block that also uses this Breaks instance.

Break from the dynamically closest enclosing breakable block that also uses this Breaks instance.

Attributes
Note

This might be different from the statically closest enclosing block!

Invocation without parentheses relies on the conversion to "empty application".

Inherited from:
Breaks
Source
Breaks.scala

A block from which one can exit with a break.

A block from which one can exit with a break. The break may be executed further down in the call stack provided that it is called on the exact same instance of Breaks.

Attributes
Inherited from:
Breaks
Source
Breaks.scala

Try a computation that produces a value, supplying a default to be used if the computation terminates with a break.

Try a computation that produces a value, supplying a default to be used if the computation terminates with a break.

tryBreakable {
 (1 to 3).map(i => if (math.random < .5) break else i * 2)
} catchBreak {
 Vector.empty
}
Attributes
Inherited from:
Breaks
Source
Breaks.scala

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4