Map

final class Map[A, B](xa: Px[A], f: A => B) extends DerivativeBase[A, B, B]

A value B dependent on the value of some Px[A].

class DerivativeBase[A, B, B]
class Derivative[B]
class Px[B]
class Object
trait Matchable
class Any

Type members

Inherited types

protected type ValRev = (B, Int)
Inherited from:
DerivativeBase

Value members

Concrete methods

override def flatMap[C](g: B => Px[C]): Derivative[C]
Definition Classes
override def map[C](g: B => C): Derivative[C]
Definition Classes
override def peek: B
Definition Classes
override def rev: Int
Definition Classes
override def toString: String
Definition Classes
Any
override def value(): B
Definition Classes

Inherited methods

final protected def _init(): ValRev
Inherited from:
DerivativeBase
final protected def _revA(): Int
Inherited from:
DerivativeBase
final protected def _updateValueIfChanged(): Unit
Inherited from:
DerivativeBase
final protected def _value(): B
Inherited from:
DerivativeBase
def extract(implicit e: Extract[B]): B

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
final def toCallback[F[_]](implicit F: Sync[F]): F[B]
Inherited from:
Px
final def valueSince(r: Int): Option[B]
Inherited from:
Px
final def withReuse(implicit ev: Reusability[B]): Px[B]

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