Cmd costructor.
Usefull when you want to artificially emit Cmd from update function.
perform "Hi" : Cmd String
perform 1 : Cmd number
"real world" exaple:
type alias Model = ()
type Msg = Fire | FireRockets
update : Msg -> Model -> (Model, Cmd Msg)
update msg model =
case msg of
Fire ->
((), perform FireRockets)
FireRockets ->
Debug.crash "World ended:("
Cmd costructor. Usefull when you want to artificially emit Cmd from update function.
"real world" exaple: