reduce

suspend fun reduce(reducer: IntentContext<T>.() -> S)(source)

Reducers reduce the current state and incoming events to produce a new state.

Parameters

reducer

the lambda reducing the current state and incoming event to produce a new state