State management with reducer support.
Each key in the state schema can optionally have a reducer function
(current_value, update_value) -> merged_value. Keys without reducers
use last-write-wins semantics.
Summary
Functions
Applies a partial update to the current state using registered reducers.
Keys present in update but absent from reducers use last-write-wins.
Keys in update that don't exist in the current state are added.
Parses a schema keyword list into {initial_state, reducers}.
Types
Functions
Applies a partial update to the current state using registered reducers.
Keys present in update but absent from reducers use last-write-wins.
Keys in update that don't exist in the current state are added.
Parses a schema keyword list into {initial_state, reducers}.
Schema entries are either:
key: default_value(no reducer, last-write-wins)key: {default_value, reducer_fn}(custom reducer)