astynax/tea-combine/1.1.0

NOTE: this package is not compatible with Elm 0.19.1

TeaCombine.Effectful.Pair

Combinators for work with effectful programs (those use @Cms and @Sub).

TODO: add some great docs.

( model2, Cmd msg2 )
-> ( model1, Cmd msg1 )
-> ( Both model1 model2, Cmd (Either msg1 msg2) )

Inits both models (with Cmds).

Update model2 msg2
-> Update model1 msg1
-> Update (Both model1 model2) (Either msg1 msg2)

Updates one of two submodels using corresponding subupdate function.

Subscription model2 msg2
-> Subscription model1 msg1
-> Subscription (Both model1 model2) (Either msg1 msg2)

Combines two subscriptions.

( model1, Cmd msg1 )
-> ( model2, Cmd msg2 )
-> ( Both model1 model2, Cmd (Either msg1 msg2) )

An infix alias for @initWith.

Update model1 msg1
-> Update model2 msg2
-> Update (Both model1 model2) (Either msg1 msg2)

An infix alias for @updateWith.

Subscription model1 msg1
-> Subscription model2 msg2
-> Subscription (Both model1 model2) (Either msg1 msg2)

An infix alias for @subscribeWith.