evolveTo

inline fun <reified E : Any> evolveTo(name: String = defaultName(E::class.java), revision: Int = 1, noinline evolve: (S, E) -> S)

Evolves the state by returning a new one, for immutable states.


inline fun <reified E : Any> evolveTo(name: String = defaultName(E::class.java), revision: Int = 1, noinline evolve: (S, E, EventStream) -> S)

Evolves an immutable state by returning a new one, reading the commit the event belongs to.