ChooseEffect

org.atnos.eff.ChooseEffect
See theChooseEffect companion object

The Choose effect models non-determinism So we can get results, either:

  • no results (when using ChooseZero)
  • the result for action1 or the result for action b (when using ChoosePlus)

When running this effect we can "collect" the results with any F which has an Alternative instance.

For example if F is List then:

  • no results is the empty list
  • the result for a or b is List(a, b)

If F is Option then:

  • no results is the None
  • the result for a or b is Some(a) or Some(b

Attributes

Companion
object
Source
ChooseEffect.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ChooseEffect

Members list

Type members

Inherited types

type _Choose[R] = Member[Choose, R]

Attributes

Inherited from:
ChooseCreation
Source
ChooseCreation.scala
type _choose[R] = MemberIn[Choose, R]

Attributes

Inherited from:
ChooseCreation
Source
ChooseCreation.scala

Value members

Inherited methods

def chooseFrom[R : _choose, A](as: List[A]): Eff[R, A]

Attributes

Inherited from:
ChooseCreation
Source
ChooseCreation.scala
def plus[R : _choose, A](a1: => Eff[R, A], a2: => Eff[R, A]): Eff[R, A]

Attributes

Inherited from:
ChooseCreation
Source
ChooseCreation.scala
def runChoose[R, U, A, F[_] : Alternative](r: Eff[R, A])(implicit evidence$1: Alternative[F], m: Aux[Choose, R, U]): Eff[U, F[A]]

Attributes

Inherited from:
ChooseInterpretation
Source
ChooseInterpretation.scala
def zero[R : _choose, A]: Eff[R, A]

Attributes

Inherited from:
ChooseCreation
Source
ChooseCreation.scala