trait
Monad
[M[_]]
extends Applicative[M] with Bind[M] with Pointed[M]
Abstract Value Members
-
def
bind
[A, B]
(a: M[A], f: (A) ⇒ M[B]): M[B]
-
def
pure
[A]
(a: ⇒ A): M[A]
Concrete Value Members
-
def
!=
(arg0: AnyRef): Boolean
-
def
!=
(arg0: Any): Boolean
-
def
##
(): Int
-
def
==
(arg0: AnyRef): Boolean
-
def
==
(arg0: Any): Boolean
-
def
apply
[A, B]
(f: M[(A) ⇒ B], a: M[A]): M[B]
-
def
asInstanceOf
[T0]
: T0
-
def
clone
(): AnyRef
-
def
eq
(arg0: AnyRef): Boolean
-
def
equals
(arg0: Any): Boolean
-
def
finalize
(): Unit
-
def
fmap
[A, B]
(fa: M[A], f: (A) ⇒ B): M[B]
-
def
getClass
(): java.lang.Class[_]
-
def
hashCode
(): Int
-
def
isInstanceOf
[T0]
: Boolean
-
def
liftA2
[A, B, C]
(a: M[A], b: M[B], f: (A, B) ⇒ C): M[C]
-
def
ne
(arg0: AnyRef): Boolean
-
def
notify
(): Unit
-
def
notifyAll
(): Unit
-
def
synchronized
[T0]
(arg0: ⇒ T0): T0
-
def
toString
(): String
-
def
wait
(): Unit
-
def
wait
(arg0: Long, arg1: Int): Unit
-
def
wait
(arg0: Long): Unit
-
def
xmap
[A, B]
(ma: M[A], f: (A) ⇒ B, g: (B) ⇒ A): M[B]
Inherited from AnyRef
Inherited from Any
Abstract a model that sequences computation through an environment.
All monad instances must satisfy 3 laws:
forall a f. f(a) == bind(pure(a), f)
forall a. a == bind(a, x => pure(x))
forall a f g. bind(a, x => bind(f(x), g)) == bind(bind(a, f), g)