AlgoMaster Logo

Exercise: Event Sourcing

1 min readUpdated June 6, 2026

Exercise 1: Replaying Events

In event sourcing, an aggregate's current state is not stored directly. It is rebuilt by replaying the events that happened to it. Write the fold that turns a stream of events back into state.

Premium Content

Subscribe to unlock full access to this content and more premium articles.