final class Mediated[M[_], A, B, C] extends AnyVal

Computation of C with a missing link between A and B. Encapsulates effectful computations () ~~~> A and B ~~~> C. By plugging in A ~~~> B one can obtain () ~~~> C. The purpose of this class is to prevent using just one of the two encapsulated computations: either both, or none. This is useful when the effects of the two computations are somehow paired and this pairing can't be broken. This is only safe when M is a lazy monad with benign effects.

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Mediated
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Mediated(value: M[(A, (B) => M[C])])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def complete(f: (A) => B)(implicit M: Bind[M]): M[C]
  6. def completeM(f: (A) => M[B])(implicit M: Bind[M]): M[C]
  7. def contramap[B0](f: (B0) => B)(implicit M: Functor[M]): Mediated[M, A, B0, C]
  8. def cps(implicit M: Bind[M]): scalaz.IndexedContT[C, B, M, A]

    Representation as a continuation preserves safety guarantees, but gives up the ability to do fst, snd.

    Representation as a continuation preserves safety guarantees, but gives up the ability to do fst, snd.

    Don't confuse with Mediated.Cps, which is unrelated.

  9. def flatMap[D, E](f: (A) => Mediated[M, B, D, E])(implicit M: Bind[M]): Mediated[M, C, D, E]
  10. def fst[S, T](f: (S) => T)(implicit M: Functor[M]): Mediated[M, A, (S, B), (T, C)]
  11. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def snd[S, T](f: (S) => T)(implicit M: Functor[M]): Mediated[M, A, (B, S), (C, T)]
  14. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped