CpsMonad

trait CpsMonad[F[_]] extends CpsAwaitable[F]

Basic CpsMonad operations. Implementing this typeclass is enough to use async/await with supports of basic control-flow constructions (if, loops, but no exceptions).

Source
CpsMonad.scala
trait CpsAwaitable[F]
class Object
trait Matchable
class Any

Type members

Types

type WF[X] = F[X]

Value members

Abstract methods

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

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

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.

Source
CpsMonad.scala