โUpdate's shape, (๋ชจ๋ธ, ๋ฉ์์ง) -> ๋ชจ๋ธ (model and message to model), matches a fold's combining function. Starting from the initial model and folding received messages in order produces the current model. Recording messages therefore allows the same state to be reconstructed by folding them in the same order. When update also returns commands, replay folds only the model part of each result and does not execute commands. The extended example checks this replay. The argument order follows C#'s Aggregate; Elm's update : Msg -> Model -> Model takes the message first, matching foldp's (a -> b -> b) order.
+Update's shape, (model, message) -> model (model and message to model), matches a fold's combining function. Starting from the initial model and folding received messages in order produces the current model. Recording messages therefore allows the same state to be reconstructed by folding them in the same order. When update also returns commands, replay folds only the model part of each result and does not execute commands. The extended example checks this replay. The argument order follows C#'s Aggregate; Elm's update : Msg -> Model -> Model takes the message first, matching foldp's (a -> b -> b) order.