Monad

jaskell.Monad
See theMonad companion object
trait Monad[F[_]] extends Applicative[F]

Attributes

Companion:
object
Graph
Supertypes
trait Applicative[F]
trait Functor[F]
class Object
trait Matchable
class Any
Known subtypes
object listMonad.type
object optionMonad.type
object tryMonad.type

Members list

Concise view

Value members

Inherited methods

def pure[A](x: A): F[A]

Attributes

Inherited from:
Functor

Extensions

Extensions

extension [A, B](x: F[A])
def >>(y: F[B]): F[B]
def >>=(f: A => F[B]): F[B]
def map(f: A => B): F[B]

The map operation can now be defined in terms of flatMap

The map operation can now be defined in terms of flatMap

Attributes

Inherited extensions

extension [A, B](fa: F[A => B])
def <*>(fb: F[A]): F[B]

Attributes

Inherited from:
Applicative
def <|>(fb: F[A => B]): F[A => B]

Attributes

Inherited from:
Applicative
extension [A, B, C](fx: F[(A, B) => C])
def liftA2(ax: F[A], bx: F[B]): F[C]

Attributes

Inherited from:
Applicative
extension [A, B](x: F[A])
def *>(bx: F[B]): F[B]

Attributes

Inherited from:
Applicative
def <*(bx: F[B]): F[A]

Attributes

Inherited from:
Applicative
extension [A, B](x: F[A])
def <:>(f: A => B): F[B]

Attributes

Inherited from:
Functor
def flatMap(f: A => F[B]): F[B]

Attributes

Inherited from:
Functor
def fmap(f: A => B): F[B]

Attributes

Inherited from:
Functor