trait
Optimisable[T[_]] extends AnyRef
Abstract Value Members
-
abstract
def
distribute(results: List[Any]): List[Any]
-
abstract
def
optimise(effects: List[T[Any]]): List[T[Any]]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
"Optimisable" effects are effects where you can define:
The expected (informal) law is that, for a given applicative interpreter of T,
run: List[T[Any]] => List[Any]
, we have:distribute(run(optimise(effects))) == run(effects)
NOTE: If an Optimisable instance doesn't satisfy this law, there will be runtime errors!!!