I think I have a pretty good grasp on Cmd.batch; as you say, it's pretty clear from the signature. Where I can't connect the dots is your notion of having my Task produce a batch of commands. As far as I know (and perhaps this is what I really need to know!), the only way to turn a Task into a Cmd is via Task.perform. So given my Task which produces 'a' on success, the only lever Task.perform gives me is that I can provide a function which converts 'a' to a 'msg'. It then produces a Cmd with the msg.
So if Task.perform is my only window for creating Cmds from Tasks, how can my Task "return a batch of commands"? It seems circular to me, and "you need to figure it out" leaves me pretty much up a creek. Do you have any other hints as to how I might go about it? I feel like I'm missing some important piece of the puzzle. On Wednesday, October 19, 2016 at 3:05:11 PM UTC+2, Rupert Smith wrote: > > On Wednesday, October 19, 2016 at 12:41:08 PM UTC+1, Austin Bingham wrote: >> >> 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) >> > > You need to figure out how to do that. Look at the type signature of > Cmd.batch - hint, it returns a single command which is actually a batch > wrapper around a list of commands. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
