Why don’t you enrich your Msg
type like so:
type Msg = ... | Several (List Msg)
and add a generic branch to your update
function for processing a message of the Several
kind (something in the spirit of: update (Several msgs) = List.foldr (... calling update recursively in an appropriate way ...) ... msgs
)?
Then when you call Task.perform
you make it generate a single Msg
that is a Several [msg1, msg2]
value. That way, you do have the “production of two messages” at the place you want it expressed.
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
I don't think I follow your logic. If my task produced a batch Cmd somehow (I'm not even sure how I would do that)