ChooseEffect

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
Companion:
object
Source:
Choose.scala
class Object
trait Matchable
class Any
object ChooseEffect.type
object all.type

Type members

Inherited types

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

Value members

Inherited methods

def chooseFrom[R : _choose, A](as: List[A]): Eff[R, A]
Inherited from:
ChooseCreation
Source:
Choose.scala
def plus[R : _choose, A](a1: => Eff[R, A], a2: => Eff[R, A]): Eff[R, A]
Inherited from:
ChooseCreation
Source:
Choose.scala
def runChoose[R, U, A, F[_] : Alternative](r: Eff[R, A])(implicit evidence$4: Alternative[F], m: Aux[Choose, R, U]): Eff[U, F[A]]
Inherited from:
ChooseInterpretation
Source:
Choose.scala
def zero[R : _choose, A]: Eff[R, A]
Inherited from:
ChooseCreation
Source:
Choose.scala