replace

fun <Value> replace(property: KProperty1<State, Value>, write: State.(Value) -> State)

property gets the value of the node that changed it. Nodes that set the same value agree. Nodes that set different values fail the run: use merge to say which one counts.

Parameters

write

returns the state with property set to the new value.