State
State<
S,A> = (s) => readonly [A,S]
Defined in: Core/State.ts:25
A synchronous computation that threads a piece of mutable state S through
a pipeline without exposing mutation at call sites.
At runtime a State<S, A> is just a function from an initial state to a pair
[value, nextState]. Nothing runs until you supply the initial state with
State.run, State.evaluate, or State.execute.
Type Parameters
Section titled “Type Parameters”S
A
Parameters
Section titled “Parameters”S
Returns
Section titled “Returns”readonly [A, S]