Impure

case class Impure[R, X, A](union: Union[R, X], continuation: Arrs[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

trait Serializable
trait Product
trait Equals
trait Eff[R, A]
class Object
trait Matchable
class Any

Value members

Concrete methods

def addLast(l: Last[R]): Eff[R, A]

Inherited methods

def *>[B](fb: Eff[R, B]): Eff[R, B]
Inherited from:
Eff
def <*[B](fb: Eff[R, B]): Eff[R, A]
Inherited from:
Eff
def addLast(l: => Eff[R, Unit]): Eff[R, A]

add one last action to be executed after any computation chained to this Eff value

add one last action to be executed after any computation chained to this Eff value

Inherited from:
Eff
def ap[B](f: Eff[R, A => B]): Eff[R, B]
Inherited from:
Eff
def flatMap[B](f: A => Eff[R, B]): Eff[R, B]
Inherited from:
Eff
def flatten[B](implicit ev: A =:= Eff[R, B]): Eff[R, B]
Inherited from:
Eff
def map[B](f: A => B): Eff[R, B]
Inherited from:
Eff
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product