DerivativeBase

sealed abstract class DerivativeBase[A, B, C](xa: Px[A], derive: A => B) extends Derivative[C]
class Derivative[C]
class Px[C]
class Object
trait Matchable
class Any
class Map[A, B]
class FlatMap[A, B]

Type members

Types

protected type ValRev = (B, Int)

Value members

Concrete methods

final protected def _init(): ValRev
final protected def _revA(): Int
final protected def _updateValueIfChanged(): Unit
final protected def _value(): B

Inherited methods

def extract(implicit e: Extract[C]): C

If this Px contains a function, it can be extracted and the Px dropped from the signature. Every time the function is invoked it will use the latest value of this Px, even if you don't explicitly hold a reference to it anymore.

If this Px contains a function, it can be extracted and the Px dropped from the signature. Every time the function is invoked it will use the latest value of this Px, even if you don't explicitly hold a reference to it anymore.

Example. From a Px[Int => String], an Int => String can be extracted.

Inherited from
Px
def flatMap[B](f: C => Px[B]): Derivative[B]
Inherited from
Px
def map[B](f: C => B): Derivative[B]
Inherited from
Px
def peek: C

Get the last used value without updating.

Get the last used value without updating.

Inherited from
Px
def rev: Int

Revision of its value. Increments when value changes.

Revision of its value. Increments when value changes.

Inherited from
Px
final def toCallback[F[_]](implicit F: Sync[F]): F[C]
Inherited from
Px
def value(): C

Get the latest value, updating itself if necessary.

Get the latest value, updating itself if necessary.

Inherited from
Px
final def valueSince(r: Int): Option[C]
Inherited from
Px
final def withReuse(implicit ev: Reusability[C]): Px[C]

In addition to updating when the underlying Px changes, this will also check its own result and halt updates if reusable.

In addition to updating when the underlying Px changes, this will also check its own result and halt updates if reusable.

Inherited from
Derivative