Convenience function for lifting an update function for an inner model and messages into a parent one.
Lifts an update function of type:
update : submsg -> submodel -> ( submodel, Cmd submsg )Into one that returns:
( model, Cmd msg )Allows update functions to be chained together. The Cmds will be batched
together.
Allows update functions that also produce lists of out messages,
to be chained together, whilst also transforming the model and outMsg
type. The Cmds will be batched together.
Allows the output of an update function that returns type:
To have its model evaluated in order to produce a new model, and to create more commands. The commands returned will be appended to those passed in using Cmd.batch.
Note that this allows multiple invokations of the same update function to be invoked recursively. Beware of causing infinite loops while doing this.