astynax / tea-combine / TeaCombine.Effectful.Pair

Combinators for work with effectful programs (those use

initWith : (flags -> ( model2, Platform.Cmd.Cmd msg2 )) -> (flags -> ( model1, Platform.Cmd.Cmd msg1 )) -> flags -> ( TeaCombine.Both model1 model2, Platform.Cmd.Cmd (Either msg1 msg2) )

Inits both models (with Cmds).

updateWith : TeaCombine.Effectful.Update model2 msg2 -> TeaCombine.Effectful.Update model1 msg1 -> TeaCombine.Effectful.Update (TeaCombine.Both model1 model2) (Either msg1 msg2)

Updates one of two submodels using corresponding subupdate function.

subscribeWith : TeaCombine.Effectful.Subscription model2 msg2 -> TeaCombine.Effectful.Subscription model1 msg1 -> TeaCombine.Both model1 model2 -> Platform.Sub.Sub (Either msg1 msg2)

Combines two subscriptions.