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
class Object
trait Matchable
class Any
object all

Type members

Inherited types

type _Choose[R] = Member[[T] =>> Choose[T], R]
Inherited from
ChooseCreation
type _choose[R] = MemberIn[[T] =>> Choose[T], R]
Inherited from
ChooseCreation

Value members

Inherited methods

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