arrow-mtl-data / arrow.mtl / State

State

typealias State<S, A> = StateT<S, ForId, A>

State<S, A> is a stateful computation that yields a value of type A.

Parameters

S - the state we are performing computation upon.

A - current value of computation.fun <S, A> State(run: (S) -> Tuple2<S, A>): State<S, A>

Constructor for State.

Parameters

run - the stateful function to wrap with State.fun State(): StateApi

Alias for StateId to make working with StateT<S, ForId, A> more elegant.

Do you like Arrow?

Arrow Org
<