Real-World Event Sourcing:

Hello. I’m also reading this book. I believe aggregates consume events to build internal state and then use that state to vet commands. It looks like apply/2 serves this purpose. There’s an example here.