Combinators for work with effectful programs (those use
oneOfInits : (flags -> ( model2, Platform.Cmd.Cmd msg2 )) -> (flags -> ( model1, Platform.Cmd.Cmd msg1 )) -> ( Either () () -> flags -> ( Either model1 model2, Platform.Cmd.Cmd (Either msg1 msg2) ), List.Nonempty.Nonempty (Either () ()) )
Combines two inits models to selector and list of paths.
This is a first step in the "oneOfInits+[orInit]"-chain.
orInit : (flags -> ( model2, Platform.Cmd.Cmd msg2 )) -> ( path -> flags -> ( model1, Platform.Cmd.Cmd msg1 ), List.Nonempty.Nonempty path ) -> ( Either path () -> flags -> ( Either model1 model2, Platform.Cmd.Cmd (Either msg1 msg2) ), List.Nonempty.Nonempty (Either path ()) )
Adds an another init to the "oneOfInits+[orInit]"-chain.
updateEither : TeaCombine.Effectful.Update model2 msg2 -> TeaCombine.Effectful.Update model1 msg1 -> Either msg1 msg2 -> Either model1 model2 -> ( Either model1 model2, Platform.Cmd.Cmd (Either msg1 msg2) )
Updates one of two submodels using corresponding subupdate function.
subscribeEither : TeaCombine.Effectful.Subscription model2 msg2 -> TeaCombine.Effectful.Subscription model1 msg1 -> Either model1 model2 -> Platform.Sub.Sub (Either msg1 msg2)
Combines two subscriptions.