STRef

sealed abstract
class STRef[S, A]

Mutable variable in state thread S containing a value of type A. http://research.microsoft.com/en-us/um/people/simonpj/papers/lazy-functional-state-threads.ps.Z

Companion
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def mod[B](f: A => A): ST[S, STRef[S, A]]

Modifies the value at this reference with the given function.

Modifies the value at this reference with the given function.

def read: ST[S, A]

Reads the value pointed at by this reference.

Reads the value pointed at by this reference.

def swap(that: STRef[S, A]): ST[S, Unit]

Swap the value at this reference with the value at another.

Swap the value at this reference with the value at another.

def write(a: => A): ST[S, STRef[S, A]]

Associates this reference with the given value.

Associates this reference with the given value.

def |=(a: => A): ST[S, STRef[S, A]]

Synonym for write

Synonym for write