modifyState

fun <S> modifyState(f: (S) -> S): Program<Unit>(source)

Replace the current state with f applied to it: a getState followed by a putState.