final class EntityT[F[_], S, E, A] extends AnyVal
EntityT[F, S, E, A]
is data type implementing the
Entity[F, S, E] state reader and event
writer abilities. It is a monad transformer used as an interpreter for functional chains
involving calls to
Entity read
and write
, turning them into a result value of F[Folded[E,
A]]
. Folded[E, A]
is either an error or a list of events bundled together with a result
value.
EntityT
interpretation runs with an instance of EventsFolder[S, E]
which is a tuple of
current state of type S
together with event application function EventApplier[S, E]
.
Interpretation essentially accumulates the written events into a Chain[E]
and applies these
events to initial state whenever a read
is required.
- F
context
- S
state
- E
event
- A
value
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- EntityT
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new EntityT(runAcc: (EventsFolder[S, E], Chain[E]) => F[Folded[E, A]])
- runAcc
Event folding function
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def flatMap[B](f: (A) => EntityT[F, S, E, B])(implicit monad: Monad[F]): EntityT[F, S, E, B]
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[B](f: (A) => B)(implicit monad: Monad[F]): EntityT[F, S, E, B]
- def run(state: Option[S])(implicit applier: EventApplier[S, E]): F[Folded[E, A]]
- val runAcc: (EventsFolder[S, E], Chain[E]) => F[Folded[E, A]]
- def toString(): String
- Definition Classes
- Any