API for modeling stateful applications.
type StatefulApp k c s e
= StatefulApp (Maybe s -> c -> ( Maybe s, e ))
Type that represents a stateful application. The following type parameters allow you to fit it to your use case:
- k - Key that's used to partition commands, events and state.
- c - Type that defines all the commands accepted by the application.
- s - Type that defines the state managed by the application.
- e - Type that defines all the events published by the application.