case class ImpureAp[R, X, A](unions: Unions[R, X], continuation: Arrs[R, List[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: List[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
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: Arrs[R, List[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
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val continuation: Arrs[R, List[Any], A]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.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
-
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()
-
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
- @native() @throws( ... )