A library providing pipeline-friendly Cmd operators.
Wraps the model with given Cmd.
incrementAndPing : Model -> ( Model, Cmd Msg )
incrementAndPing model =
{ model | counter = model.counter + 1 }
|> withCmd pingWraps the model with given Cmds.
incrementAndPingTwice : Model -> ( Model, Cmd Msg )
incrementAndPingTwice model =
{ model | counter = model.counter + 1 }
|> withCmds [ ping 1, ping 2 ]Adds a new Cmd to an existing model-Cmd tuple.
(model, cmd)
|> addCmd pingAdds new Cmds to an existing model-Cmd tuple.
(model, cmd)
|> addCmds [ping 1, ping 2]
Wraps the model with
Cmd.none.