arowM / elm-init-builder / Init

Build the root init function from submodel init functions.

Core

top : (a -> model) -> ( a -> model, Platform.Cmd.Cmd msg )

field : ( a, Platform.Cmd.Cmd msg ) -> ( a -> b, Platform.Cmd.Cmd msg ) -> ( b, Platform.Cmd.Cmd msg )

noCmd : a -> ( a -> b, Platform.Cmd.Cmd msg ) -> ( b, Platform.Cmd.Cmd msg )

noCmd a == field ( a, Cmd.none )

andThen : (model -> ( model, Platform.Cmd.Cmd msg )) -> ( model, Platform.Cmd.Cmd msg ) -> ( model, Platform.Cmd.Cmd msg )