Impure
case class Impure[R, X, A](union: Effect[R, X], continuation: Continuation[R, X, A], last: Last[R]) extends Eff[R, A]
Impure is an effect (encoded as one possibility among other effects, a Union) and a continuation providing the next Eff value.
This essentially models a flatMap operation with the current effect and the monadic function to apply to a value once the effect is interpreted
One effect can always be executed last, just for side-effects
- Source:
- Eff.scala