arrow-mtl-data / arrow.mtl / State


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

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


S - the state we are performing computation upon.

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

Constructor for State. State<S, A> is an alias for IndexedStateT<ForId, S, S, A>


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

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

Do you like Arrow?

Arrow Org