This is a simple implementation of the Model-View-Update pattern in Scala. It is based on the Elm Architecture, which is described in detail here.
In particular, this example is based on the Model-View-Update (MVU) – How Does It Work? article by Thomas Bandt.