arrow-fx / arrow.fx / Schedule / Decision

Decision

data class ~~Decision~~<out A, out B> : DecisionOf<A, B> Deprecated: The IO datatype and it’s related type classes will disappear in Arrow 0.13.0. All useful operations are offered directly over suspend functions by Arrow Fx Coroutines. https://arrow-kt.io/docs/fx/async/

A single decision. Contains the decision to continue, the delay, the new state and the (lazy) result of a Schedule.

Constructors

<init> A single decision. Contains the decision to continue, the delay, the new state and the (lazy) result of a Schedule.Decision(cont: Boolean, delay: Duration, state: A, finish: Eval<B>)

Properties

cont val cont: Boolean
delay val delay: Duration
finish val finish: Eval<B>
state val state: A

Functions

bimap fun <C, D> bimap(f: (A) -> C, g: (B) -> D): Decision<C, D>
combineWith fun <C, D> combineWith(other: Decision<C, D>, f: (Boolean, Boolean) -> Boolean, g: (Duration, Duration) -> Duration): Decision<Tuple2<A, C>, Tuple2<B, D>>
mapLeft fun <C> mapLeft(f: (A) -> C): Decision<C, B>
mapRight fun <D> mapRight(g: (B) -> D): Decision<A, D>
not operator fun not(): Decision<A, B>

Companion Object Functions

cont fun <A, B> cont(d: Duration, a: A, b: Eval<B>): Decision<A, B>
done fun <A, B> done(d: Duration, a: A, b: Eval<B>): Decision<A, B>

Do you like Arrow?

Arrow Org
<