org.scalactic.algebra

Monad

trait Monad[Context[_]] extends Applicative[Context]

Typeclass trait for algebraic structure containing insertion and flat-mapping methods that obey laws of identity and associativity.

A Monad instance wraps an object that in some way behaves as a Monad.

Source
Monad.scala
Linear Supertypes
Applicative[Context], Functor[Context], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Monad
  2. Applicative
  3. Functor
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def flatMap[A, B](ca: Context[A])(f: (A) ⇒ Context[B]): Context[B]

    Applies the given function to the value contained in this context, returning the result of the function, which is a value wrapped in another context.

  2. abstract def insert[A](a: A): Context[A]

    Inserts a value into a context.

    Inserts a value into a context.

    Definition Classes
    Applicative

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def applying[A, B](ca: Context[A])(cab: Context[(A) ⇒ B]): Context[B]

    Applies the given function in context to the given value in context, returning the result in the context.

    Applies the given function in context to the given value in context, returning the result in the context.

    Definition Classes
    MonadApplicative
  7. def applying[A, B, C, D](ca: Context[A], cb: Context[B], cc: Context[C])(cf: Context[(A, B, C) ⇒ D]): Context[D]

    Applies the given function in context to the given values in context, returning the result in the context.

    Applies the given function in context to the given values in context, returning the result in the context.

    Definition Classes
    Applicative
  8. def applying[A, B, C](ca: Context[A], cb: Context[B])(cf: Context[(A, B) ⇒ C]): Context[C]

    Applies the given function in context to the given values in context, returning the result in the context.

    Applies the given function in context to the given values in context, returning the result in the context.

    Definition Classes
    Applicative
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def flatten[A](cca: Context[Context[A]]): Context[A]

    Flattens a nested context into a single context.

  15. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. def lift[A, B, C, D](f: (A, B, C) ⇒ D): (Context[A], Context[B], Context[C]) ⇒ Context[D]

    Transforms the given function into another function where each parameter type and the result type are lifted into a context.

    Transforms the given function into another function where each parameter type and the result type are lifted into a context.

    Definition Classes
    Applicative
  19. def lift[A, B, C](f: (A, B) ⇒ C): (Context[A], Context[B]) ⇒ Context[C]

    Transforms the given function into another function where each parameter type and the result type are lifted into a context.

    Transforms the given function into another function where each parameter type and the result type are lifted into a context.

    Definition Classes
    Applicative
  20. def lift[A, B](f: (A) ⇒ B): (Context[A]) ⇒ Context[B]

    Transforms the given function into another function where the parameter and result types are lifted into a context.

    Transforms the given function into another function where the parameter and result types are lifted into a context.

    Definition Classes
    Applicative
  21. def map[A, B](ca: Context[A])(f: (A) ⇒ B): Context[B]

    Applies the given function to the given value in context, returning the result in the context.

    Applies the given function to the given value in context, returning the result in the context.

    Definition Classes
    ApplicativeFunctor
  22. def mapAll[A, B, C, D](ca: Context[A], cb: Context[B], cc: Context[C])(f: (A, B, C) ⇒ D): Context[D]

    Applies the given function to the given values in context, returning the result in the context.

    Applies the given function to the given values in context, returning the result in the context.

    Definition Classes
    Applicative
  23. def mapAll[A, B, C](ca: Context[A], cb: Context[B])(f: (A, B) ⇒ C): Context[C]

    Applies the given function to the given values in context, returning the result in the context.

    Applies the given function to the given values in context, returning the result in the context.

    Definition Classes
    Applicative
  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def toString(): String

    Definition Classes
    AnyRef → Any
  29. def tupled[A, B, C](ca: Context[A], cb: Context[B], cc: Context[C]): Context[(A, B, C)]

    Transforms three contexts containing values into a context containing a tuple of the three corresponding values.

    Transforms three contexts containing values into a context containing a tuple of the three corresponding values.

    Definition Classes
    Applicative
  30. def tupled[A, B](ca: Context[A], cb: Context[B]): Context[(A, B)]

    Transforms two contexts containing values into a context containing a tuple of the two corresponding values.

    Transforms two contexts containing values into a context containing a tuple of the two corresponding values.

    Definition Classes
    Applicative
  31. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Applicative[Context]

Inherited from Functor[Context]

Inherited from AnyRef

Inherited from Any

Ungrouped