withState

open fun withState(block: (state: S) -> Unit)

Provide current state in block