update

abstract fun update(model: Model, message: Message): Model

Pure function that updates the model based on a message.

Return

The new state after processing the message

Parameters

model

The current state

message

The message to process