ComposableReaction

io.github.positionpal.reaction.ReactionADT.ComposableReaction
trait ComposableReaction[E, S, R] extends ReactionADT[E, S, R]

A set of operations that compose the execution of two or more Reaction together

Attributes

Graph
Supertypes
trait ReactionADT[E, S, R]
class Object
trait Matchable
class Any
Known subtypes
trait OptionReaction[E, S, T]

Members list

Type members

Inherited and Abstract types

opaque type Reaction[F[_]]

Represent the reaction that's triggered within a specific Context

Represent the reaction that's triggered within a specific Context

Type parameters

F

The effect to apply

Attributes

Inherited from:
ReactionADT

Represent the result of the reaction

Represent the result of the reaction

Attributes

Inherited from:
ReactionADT

Value members

Inherited methods

def on[F[_]](reaction: Context[E, S] => F[R]): Reaction[F]

Create a reaction on an given Context

Create a reaction on an given Context

Value parameters

reaction

The function representing the reaction.

Attributes

Returns

The Reaction object.

Inherited from:
ReactionADT

Extensions

Extensions

extension [F[_]](reaction: Reaction[F])(using evidence$1: Monad[F])
def andThen: Reaction[F]

Compose the execution of two Reaction executing this first and then the other provided

Compose the execution of two Reaction executing this first and then the other provided

Value parameters

other

The Reaction to execute after this one

Attributes

Returns

The new Reaction that is the combination of the other two

Inherited extensions

extension [F[_]](reaction: Reaction[F])(using evidence$1: Monad[F])
def apply: F[R]

Executes the Reaction producing a ReactionResult

Executes the Reaction producing a ReactionResult

Value parameters

context

The Context in which the Reaction should run

Attributes

Returns

a functional structure F in which the result is contained

Inherited from:
ReactionADT