run
run<
S>(initialState): <A>(st) => readonly [A,S]
Defined in: Core/State.ts:188
Runs a State computation with an initial state, returning both the produced value and the final state as a pair.
Data-last — the computation is the data being piped.
Type Parameters
Section titled “Type Parameters”S
Parameters
Section titled “Parameters”initialState
Section titled “initialState”S
Returns
Section titled “Returns”<
A>(st): readonly [A,S]
Type Parameters
Section titled “Type Parameters”A
Parameters
Section titled “Parameters”State<S, A>
Returns
Section titled “Returns”readonly [A, S]