Coming from react, I am learning to understand Elm.
In the Todomvc example code, there is the following code snippet:
-- How we update our Model on a given Msg?
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
NoOp ->
model ! [] <-- What is this?
What I (think I) understand, is that the update
function takes in a msg
of type Msg
and a model
of type Model
, and returns a tuple of containing a Model
and a Cmd Msg
.
But how should I read the return statement?
model ! []
What does this statement mean? return a "model [something] empty list"?
Did I miss something in the docs where this is explained? (Googling "elm !" did not get me far :)