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
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EntityT
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new EntityT(runAcc: (EventsFolder[S, E], Chain[E]) => F[Folded[E, A]])

    runAcc

    Event folding function

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def flatMap[B](f: (A) => EntityT[F, S, E, B])(implicit monad: Monad[F]): EntityT[F, S, E, B]
  6. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  7. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  8. def map[B](f: (A) => B)(implicit monad: Monad[F]): EntityT[F, S, E, B]
  9. def run(state: Option[S])(implicit applier: EventApplier[S, E]): F[Folded[E, A]]
  10. val runAcc: (EventsFolder[S, E], Chain[E]) => F[Folded[E, A]]
  11. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped