Continuation

case class Continuation[R, A, B](functions: Vector[Any => Eff[R, Any]], onNone: Last[R]) extends A => Eff[R, B]

Sequence of monadic functions from A to B: A => Eff[B]

Internally it is represented as a Vector of functions:

A => Eff[R, X1]; X1 => Eff[R, X2]; X2 => Eff[R, X3]; ...; X3 => Eff[R, B]

An alternate unit value can also be set on this function in case the argument A is not available. This value can be set by an effect to do some cleanup if it doesn't even get the chance to add its own effect. See SafeEffect.bracket

Companion
object
trait Serializable
trait Product
trait Equals
trait A => Eff[R, B]
class Object
trait Matchable
class Any

Value members

Concrete methods

def append[C](f: B => Eff[R, C]): Continuation[R, A, C]

append a new monadic function to this list of functions such that

append a new monadic function to this list of functions such that

Arrs[R, A, B] => (B => Eff[R, C]) => Arrs[R, A, C]

def apply(a: A): Eff[R, B]

execute this monadic function

execute this monadic function

This method is stack-safe

def applyEval(a: A): Eff[R, B]
def contraFlatMap[C](f: C => Eff[R, A]): Continuation[R, C, B]
def contramap[C](f: C => A): Continuation[R, C, B]
def dimapEff[C, D](f: C => A)(g: Eff[R, B] => Eff[R, D]): Continuation[R, C, D]

adapt the input and output of an Arrs function

adapt the input and output of an Arrs function

def interpret[U, C](map: Eff[R, B] => Eff[U, C])(mapOnNone: Last[R] => Last[U]): Continuation[U, A, C]

create an Arrs function from the result of another Arrs function

create an Arrs function from the result of another Arrs function

def interpretEff[U, C](map: Eff[R, B] => Eff[U, C])(mapOnNone: Eff[R, Unit] => Eff[U, Unit]): Continuation[U, A, C]

create an Arrs function from the result of another Arrs function

create an Arrs function from the result of another Arrs function

def map[C](f: B => C): Continuation[R, A, C]

map the last value

map the last value

def mapLast[C](f: Eff[R, B] => Eff[R, C]): Continuation[R, A, C]

map the last returned effect

map the last returned effect

def runOnNone: Eff[R, Unit]
def transform[U1, U2, M[_], N[_]](t: FunctionK[M, N])(implicit m: Aux[M, R, U1], n: Aux[N, R, U2], into: IntoPoly[U1, U2]): Continuation[R, A, B]

Inherited methods

@unspecialized
def andThen[A](g: Eff[R, B] => A): A => A
Inherited from
Function1
@unspecialized
def compose[A](g: A => A): A => Eff[R, B]
Inherited from
Function1
def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product
override def toString(): String
Definition Classes
Function1 -> Any
Inherited from
Function1