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
Ordering
- Alphabetic
- By Inheritance
Inherited
- Mediated
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new Mediated(value: M[(A, (B) => M[C])])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def complete(f: (A) => B)(implicit M: Bind[M]): M[C]
- def completeM(f: (A) => M[B])(implicit M: Bind[M]): M[C]
- def contramap[B0](f: (B0) => B)(implicit M: Functor[M]): Mediated[M, A, B0, C]
- 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.
- def flatMap[D, E](f: (A) => Mediated[M, B, D, E])(implicit M: Bind[M]): Mediated[M, C, D, E]
- def fst[S, T](f: (S) => T)(implicit M: Functor[M]): Mediated[M, A, (S, B), (T, C)]
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def snd[S, T](f: (S) => T)(implicit M: Functor[M]): Mediated[M, A, (B, S), (C, T)]
- def toString(): String
- Definition Classes
- Any