module Utils.Cmd exposing ( pipeUpdate , (:>) ) import Platform.Cmd as Cmd pipeUpdate : (model, Cmd msg) -> (model -> (model, Cmd msg)) -> (model, Cmd msg) pipeUpdate (model, cmd) f = let (model', cmd') = f model in (model', Cmd.batch [ cmd, cmd' ]) (:>) : (m, Cmd a) -> (m -> (m, Cmd a)) -> (m, Cmd a) (:>) = pipeUpdate infixl 0 :>