forward

abstract fun ChangeScope<C>.forward(    model: M,     id: EventIdentifier,     event: T): M

Applies the event to the given model, and returns a new immutable model. Additionally, changes should be issued using the ChangeScope.

Receiver

the ChangeScope to issue some changes. You should note that the backward method will only be called for changes issued to the ChangeScope, so unless your events are commutative, you should make sure to save them there.

Return

the updated model.

Parameters

model

the current model.

id

the EventIdentifier of the event.

event

the body of the event.