CpsThrowMonad

cps.CpsThrowMonad
trait CpsThrowMonad[F[_]] extends CpsMonad[F]

Monad, where we can throw error but can catch one only outside of a monad context.

An example as monad which interpret in sync context, such as Option or collections.

Attributes

Source:
CpsMonad.scala
Graph
Supertypes
trait CpsMonad[F]
trait CpsAwaitable[F]
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Type members

Inherited types

Attributes

Inherited from:
CpsMonad
Source:
CpsMonad.scala
type WF[X] = F[X]

Attributes

Inherited from:
CpsMonad
Source:
CpsMonad.scala

Value members

Abstract methods

def error[A](e: Throwable): F[A]

represent error e in monadic context.

represent error e in monadic context.

Attributes

Source:
CpsMonad.scala

Inherited methods

def apply[T](op: Context => F[T]): F[T]

run op in the context environment.

run op in the context environment.

Attributes

Inherited from:
CpsMonad
Source:
CpsMonad.scala
def flatMap[A, B](fa: F[A])(f: A => F[B]): F[B]

bind combinator, which compose f over fa

bind combinator, which compose f over fa

Attributes

Inherited from:
CpsMonad
Source:
CpsMonad.scala
def lazyPure[T](op: => T): F[T]

Lazy variant of pure, which by default - create monadic expression according to the choosen monad types. (i.e. delaing for effect monads, starting for eager monand, pure by defiault)

Lazy variant of pure, which by default - create monadic expression according to the choosen monad types. (i.e. delaing for effect monads, starting for eager monand, pure by defiault)

Attributes

Inherited from:
CpsMonad
Source:
CpsMonad.scala
def map[A, B](fa: F[A])(f: A => B): F[B]

map a function f over fa

map a function f over fa

Attributes

Inherited from:
CpsMonad
Source:
CpsMonad.scala
def pure[T](t: T): F[T]

Pure - wrap value t inside monad.

Pure - wrap value t inside monad.

Note, that pure use eager evaluation, which is different from Haskell.

Attributes

Inherited from:
CpsMonad
Source:
CpsMonad.scala