Rxn

dev.tauri.choam.core.Rxn
See theRxn companion object
sealed abstract class Rxn[-A, +B]

An effectful function from A to B; when executed, it may update any number of Refs atomically. (It may also create new Refs.)

These functions are composable (see below), and composition preserves their atomicity. That is, all affected Refs will be updated atomically.

A Rxn forms an Arrow (more specifically, an ArrowChoice). It also forms a Monad in B; however, consider using the arrow combinators (when possible) instead of flatMap (since a static combination of Rxns may be more performant).

The relation between Rxn and Axn is approximately Rxn[A, B] ≡ (A => Axn[B]); or, alternatively Axn[A] ≡ Rxn[Any, A].

Attributes

Companion
object
Source
Rxn.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
Rxn.scala

Concrete methods

final def *[X <: A, C](that: Rxn[X, C]): Rxn[X, (B, C)]

Attributes

Source
Rxn.scala
final def *>[X <: A, C](that: Rxn[X, C]): Rxn[X, C]

Attributes

Source
Rxn.scala
final def +[X <: A, Y >: B](that: Rxn[X, Y]): Rxn[X, Y]

Attributes

Source
Rxn.scala
final def <*[X <: A, C](that: Rxn[X, C]): Rxn[X, B]

Attributes

Source
Rxn.scala
final def >>[X <: A, C](that: => Rxn[X, C]): Rxn[X, C]

Attributes

Source
Rxn.scala
final def >>>[C](that: Rxn[B, C]): Rxn[A, C]

Attributes

Source
Rxn.scala
final def ?: Rxn[A, Option[B]]

Attributes

Source
Rxn.scala
final def as[C](c: C): Rxn[A, C]

Attributes

Source
Rxn.scala
final def attempt: Rxn[A, Option[B]]

Attributes

Source
Rxn.scala
final def contramap[C](f: C => A): Rxn[C, B]

Attributes

Source
Rxn.scala
final def dimap[C, D](f: C => A)(g: B => D): Rxn[C, D]

Attributes

Source
Rxn.scala
final def dup: Rxn[A, (B, B)]

Attributes

Source
Rxn.scala
final def first[C]: Rxn[(A, C), (B, C)]

Attributes

Source
Rxn.scala
final def flatMap[X <: A, C](f: B => Rxn[X, C]): Rxn[X, C]

Attributes

Source
Rxn.scala
final def flatMapF[C](f: B => Axn[C]): Rxn[A, C]

Attributes

Source
Rxn.scala
final def flatTap(rxn: Rxn[B, Unit]): Rxn[A, B]

Attributes

Source
Rxn.scala
final def flatten[C](implicit ev: B <:< Axn[C]): Rxn[A, C]

Attributes

Source
Rxn.scala
final def map[C](f: B => C): Rxn[A, C]

Attributes

Source
Rxn.scala
final def map2[X <: A, C, D](that: Rxn[X, C])(f: (B, C) => D): Rxn[X, D]

Attributes

Source
Rxn.scala
final def maybe: Rxn[A, Boolean]

Attributes

Source
Rxn.scala
final def perform[F[_], X >: B](a: A, mcas: Mcas, strategy: RetryStrategy)(implicit F: Async[F]): F[X]

Attributes

Source
Rxn.scala
final def postCommit(pc: Rxn[B, Unit]): Rxn[A, B]

Attributes

Source
Rxn.scala
final def productL[X <: A, C](that: Rxn[X, C]): Rxn[X, B]

Attributes

Source
Rxn.scala
final def productR[X <: A, C](that: Rxn[X, C]): Rxn[X, C]

Attributes

Source
Rxn.scala
final def provide(a: A): Axn[B]

Attributes

Source
Rxn.scala
final def second[C]: Rxn[(C, A), (C, B)]

Attributes

Source
Rxn.scala
final def toFunction: A => Axn[B]

Attributes

Source
Rxn.scala
final def unsafePerform(a: A, mcas: Mcas, strategy: Spin): B

Execute the Rxn with the specified input a.

Execute the Rxn with the specified input a.

This method is unsafe because it performs side-effects.

Value parameters

a

the input to the Rxn.

mcas

the internal.mcas.Mcas implementation to use.

strategy

the retry strategy to use.

Attributes

Returns

the result of the executed Rxn.

Source
Rxn.scala
final def void: Rxn[A, Unit]

Attributes

Source
Rxn.scala
final def ×[C, D](that: Rxn[C, D]): Rxn[(A, C), (B, D)]

Attributes

Source
Rxn.scala