Until

final case
class Until[A](hi: Ex[A], gen: Random)(implicit num: Num[A]) extends Ex[A] with Act with ProductWithAdjuncts

A random number between zero (inclusive) and a given hi boundary (exclusive). hi may be negative, but it must not be zero.

This is both an expression and an action. The action draws a new random number, the expression reports the last drawn value.

Example:

 val gen = Random()
 val r100 = gen.until(100)
 Act(
   r100, // draw new number
   PrintLn("Random number: " ++ r100.toStr)  // print current value
 )
Companion
object
trait Serializable
trait ProductWithAdjuncts
trait Act
trait Ex[A]
trait Flow
trait Lazy
trait Product
trait Equals
class Object
trait Matchable
class Any

Type members

Types

type Repr[T <: Txn[T]] = IExpr[T, A] & IAction[T]

Value members

Concrete methods

override
def adjuncts: List[Adjunct]
Definition Classes
ProductWithAdjuncts
override
def productPrefix: String
Definition Classes
Product
def update: Act

Convenient method that returns the Until itself. This can be used for additional clarity when writing Bang() ---> x.update instead of Bang() ---> x.

Convenient method that returns the Until itself. This can be used for additional clarity when writing Bang() ---> x.update instead of Bang() ---> x.

Inherited methods

final
def expand[T <: Txn[LazyRef(...)]](implicit ctx: Context[T], tx: T): Repr[T]
Inherited from
Lazy
def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product

Inherited fields

@transient
final protected
val ref: Object
Inherited from
Lazy