[elm-discuss] one message calls two messages

2016-05-26 Thread 'Dave Keen' via Elm Discuss
You can use http://package.elm-lang.org/packages/ccapndave/elm-update-extra/1.0.0/Update-Extra (this is a neater way of calling update recursively) -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receivin

Re: [elm-discuss] one message calls two messages

2016-05-26 Thread Fedor Nezhivoi
You might be interested in checking examples here: https://github.com/gyzerok/elm-architecture-plus-tutorial 2016-05-26 21:18 GMT+06:00 germain : > Thanks ~ > > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > To unsubscribe from this group a

Re: [elm-discuss] one message calls two messages

2016-05-26 Thread germain
Thanks ~ -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

Re: [elm-discuss] one message calls two messages

2016-05-26 Thread Peter Damoc
You can also call the function recursively: update : Msg -> Model -> ( Model, Cmd Msg ) update msg model = case msg of IncrementBothCounters -> model |> update IncrementFirstCounter |> fst |> update IncrementFirstCounter Incremen

Re: [elm-discuss] one message calls two messages

2016-05-26 Thread Janis Voigtländer
Well, of course Cmd.batch [send IncrementFirstCounter, send IncrementSecondCounter]. ​ 2016-05-26 16:29 GMT+02:00 Janis Voigtländer : > Cmd.batch [ send IncrementFirstCounter, send IncrementFirstCounter] > > where: > > send msg = performFailproof identity (Task.succeed msg) > > and where performF

Re: [elm-discuss] one message calls two messages

2016-05-26 Thread Janis Voigtländer
Cmd.batch [ send IncrementFirstCounter, send IncrementFirstCounter] where: send msg = performFailproof identity (Task.succeed msg) and where performFailproof comes from http://package.elm-lang.org/packages/NoRedInk/elm-task-extra. ​ 2016-05-26 16:24 GMT+02:00 germain : > Hi, > > This is the pl

[elm-discuss] one message calls two messages

2016-05-26 Thread germain
Hi, This is the plan: There is one counter with its button which increments it by one. There is another counter with its button which increments it by one. And finally there is another button which increments both above counters by one. Is it possible to the last button to send a message to th