Var

kyo.Var
See theVar companion trait
object Var

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Var.type

Members list

Type members

Classlikes

final class UseOps[V](dummy: Unit) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
object internal

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
internal.type

Value members

Concrete methods

inline def get[V](using inline tag: Tag[Var[V]], inline frame: Frame): V < Var[V]

Obtains the current value of the 'Var'.

Obtains the current value of the 'Var'.

Attributes

def run[V, A : Flat, S](state: V)(v: A < (Var[V] & S))(implicit evidence$1: Flat[A], Tag[Var[V]], Frame): A < S

Handles the effect and discards the 'Var' state.

Handles the effect and discards the 'Var' state.

Attributes

def runTuple[V, A : Flat, S](state: V)(v: A < (Var[V] & S))(implicit evidence$1: Flat[A], Tag[Var[V]], Frame): (V, A) < S

Handles the effect and returns a tuple with the final Var state and the computation's result.

Handles the effect and returns a tuple with the final Var state and the computation's result.

Attributes

inline def set[V](inline value: V)(using inline tag: Tag[Var[V]], inline frame: Frame): V < Var[V]

Sets a new value and returns the previous one.

Sets a new value and returns the previous one.

Attributes

inline def setDiscard[V](inline value: V)(using inline tag: Tag[Var[V]], inline frame: Frame): Unit < Var[V]

Sets a new value and returns Unit.

Sets a new value and returns Unit.

Attributes

inline def update[V](inline f: V => V)(using inline tag: Tag[Var[V]], inline frame: Frame): V < Var[V]

Applies the update function and returns the new value.

Applies the update function and returns the new value.

Attributes

inline def updateDiscard[V](inline f: V => V)(using inline tag: Tag[Var[V]], inline frame: Frame): Unit < Var[V]

Applies the update function and returns Unit.

Applies the update function and returns Unit.

Attributes

inline def use[V]: UseOps[V]