DecisionConstructors

class Object
trait Matchable
class Any
object Decision.type

Value members

Concrete methods

def accept[E](ev: E, evs: E*): Decision[Nothing, E, Unit]

Constructs a program that decides to accept a sequence of events

Constructs a program that decides to accept a sequence of events

def acceptReturn[E, T](t: T)(ev: E, evs: E*): Decision[Nothing, E, T]

Constructs a program that decides to accept a sequence of events and also returns an output

Constructs a program that decides to accept a sequence of events and also returns an output

def acceptWhen[E](predicate: => Boolean)(ev: E, evs: E*): Decision[Nothing, E, Unit]

Constructs a program that decides to accept a sequence of events or do nothing based on a boolean predicate

Constructs a program that decides to accept a sequence of events or do nothing based on a boolean predicate

def acceptWhen[E](ev: Option[E]): Decision[Nothing, E, Unit]

Constructs a program that decides to accept an optional single event or do nothing

Constructs a program that decides to accept an optional single event or do nothing

def acceptWhen[R, E](ev: Option[E])(orElse: R, other: R*): Decision[R, E, Unit]

Constructs a program that decides to accept an optional single event or reject otherwise

Constructs a program that decides to accept an optional single event or reject otherwise

def acceptWhen[R, E](eit: Either[R, E]): Decision[R, E, Unit]

Constructs a program that decides to accept an optional single event or reject otherwise

Constructs a program that decides to accept an optional single event or reject otherwise

@targetName("acceptWhenEitherNec")
def acceptWhen[R, E](eit: EitherNec[R, E]): Decision[R, E, Unit]

Constructs a program that decides to accept an optional single event or reject otherwise

Constructs a program that decides to accept an optional single event or reject otherwise

def apply[T](t: T): Decision[Nothing, Nothing, T]

Constructs a program that outputs a pure value

Constructs a program that outputs a pure value

def fromEither[R, T](eit: Either[R, T]): Decision[R, Nothing, T]

Constructs a program that either outputs a value or rejects

Constructs a program that either outputs a value or rejects

def fromEitherNec[R, T](eit: EitherNec[R, T]): Decision[R, Nothing, T]

Constructs a program that either outputs a value or rejects

Constructs a program that either outputs a value or rejects

You can also use .toDecision syntax for more convenience.

def fromOption[R, T](opt: Option[T], orElse: R, other: R*): Decision[R, Nothing, T]

Constructs a program from an optional value, that outputs value if exists or rejects otherwise

Constructs a program from an optional value, that outputs value if exists or rejects otherwise

You can also use .toDecision syntax for more convenience

def pure[T](t: T): Decision[Nothing, Nothing, T]

Constructs a program that outputs a pure value

Constructs a program that outputs a pure value

def reject[R, E](reason: R, otherReasons: R*): Decision[R, E, Nothing]

Constructs a program that decides to reject with a sequence of reasons

Constructs a program that decides to reject with a sequence of reasons

def rejectWhen[R](predicate: => Boolean)(ev: R, evs: R*): Decision[R, Nothing, Unit]

Constructs a program that decides to reject with a sequence of reasons if a predicate satisfies

Constructs a program that decides to reject with a sequence of reasons if a predicate satisfies

def rejectWhen[R](ev: Option[R]): Decision[R, Nothing, Unit]

Constructs a program that decides to reject with an optional single reason or do nothing otherwise

Constructs a program that decides to reject with an optional single reason or do nothing otherwise

def unit: Decision[Nothing, Nothing, Unit]

Constructs a program that outputs a trivial output

Constructs a program that outputs a trivial output

def validate[R, T](validation: ValidatedNec[R, T]): Decision[R, Nothing, T]

Constructs a program that uses a validation to decide whether to output a value or reject with error(s)

Constructs a program that uses a validation to decide whether to output a value or reject with error(s)

You can also use .toDecision syntax for more convenience