Monad

libretto.Monad
trait Monad[->[_, _], F[_]] extends Functor[->, F]

Witnesses that F is a monad in the category ->.

Attributes

Graph
Supertypes
trait Functor[->, F]
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

def flatten[A]: F[F[A]] -> F[A]
def pure[A]: A -> F[A]

Concrete methods

def liftF[A, B](f: A -> F[B]): F[A] -> F[B]

Inherited methods

def lift[A, B](f: A -> B): F[A] -> F[B]

Attributes

Inherited from:
Functor
def [G[_]](that: ContraFunctor[->, G]): ContraFunctor[->, [x] =>> F[G[x]]]

Composition with a contravariant functor. Results in a contravariant functor.

Composition with a contravariant functor. Results in a contravariant functor.

Attributes

Inherited from:
Functor
def [G[_]](that: Functor[->, G]): Functor[->, [x] =>> F[G[x]]]

Composition with another covariant functor.

Composition with another covariant functor.

Attributes

Inherited from:
Functor

Inherited fields

Attributes

Inherited from:
Functor

Extensions

Extensions

extension [A, B](f: A -> F[B])
def >=[C](g: B -> F[C]): A -> F[C]