case class ImpureAp[R, X, A](unions: Unions[R, X], continuation: Continuation[R, Vector[Any], A], last: Last[R] = Last.none[R]) extends Eff[R, A] with Product with Serializable
ImpureAp is a list of independent effects and a pure function creating a value with all the resulting values once all effects have been interpreted.
This essentially models a sequence + map operation but it is important to understand that the list of
Union objects can represent different effects and be like: Vector[Option[Int], Future[String], Option[Int]]
.
Interpreting such an Eff value for a given effect (say Option) consists in:
- grouping all the Option values,
- sequencing them
- pass them to a continuation which will apply the 'map' functions when the other effects (Future in the example above) will have been interpreted
VERY IMPORTANT:
- this object is highly unsafe
- the size of the list argument to 'map' must always be equal to the number of unions in the Unions object
- the types of the elements in the list argument to 'map' must be the exact types of each effect in unions.unions
- Source
- Eff.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- ImpureAp
- Serializable
- Serializable
- Product
- Equals
- Eff
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new ImpureAp(unions: Unions[R, X], continuation: Continuation[R, Vector[Any], A], last: Last[R] = Last.none[R])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
*>[B](fb: Eff[R, B]): Eff[R, B]
- Definition Classes
- Eff
-
def
<*[B](fb: Eff[R, B]): Eff[R, A]
- Definition Classes
- Eff
-
def
<<[B](fb: Eff[R, B]): Eff[R, A]
- Definition Classes
- Eff
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
>>[B](fb: Eff[R, B]): Eff[R, B]
- Definition Classes
- Eff
-
def
>>=[B](f: (A) ⇒ Eff[R, B]): Eff[R, B]
- Definition Classes
- Eff
-
def
addLast(l: Last[R]): Eff[R, A]
add one last action to be executed after any computation chained to this Eff value
-
def
addLast(l: ⇒ Eff[R, Unit]): Eff[R, A]
add one last action to be executed after any computation chained to this Eff value
add one last action to be executed after any computation chained to this Eff value
- Definition Classes
- Eff
-
def
ap[B](f: Eff[R, (A) ⇒ B]): Eff[R, B]
- Definition Classes
- Eff
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val continuation: Continuation[R, Vector[Any], A]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMap[B](f: (A) ⇒ Eff[R, B]): Eff[R, B]
- Definition Classes
- Eff
-
def
flatten[B](implicit ev: <:<[A, Eff[R, B]]): Eff[R, B]
- Definition Classes
- Eff
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val last: Last[R]
-
def
map[B](f: (A) ⇒ B): Eff[R, B]
- Definition Classes
- Eff
-
def
map2[B, C](fb: Eff[R, B])(f: (A, B) ⇒ C): Eff[R, C]
- Definition Classes
- Eff
-
def
map2Flatten[B, C](fb: Eff[R, B])(f: (A, B) ⇒ Eff[R, C]): Eff[R, C]
- Definition Classes
- Eff
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
product[B](fb: Eff[R, B]): Eff[R, (A, B)]
- Definition Classes
- Eff
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toMonadic: Eff[R, A]
- val unions: Unions[R, X]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()