The Random module has a lot of functions for building up more complicated
random values from the primitives. So you usually shouldn't have to batch
commands for this stuff. For example, you could use Random.pair

type Msg = Roll | NewFaces (Int, Int)

update msg model =
  case msg of
    Roll ->
      ( model, Random.generate NewFaces (Random.pair (Random.int 1 6)
(Random.int 1 6)) )



On Mon, Jan 2, 2017 at 4:08 AM, Bernardo Gomes de Abreu <
[email protected]> wrote:

> Hi guys,
>
> I'm studying elm. So, i'm very newbiee.
>
> I wrote a code for two dice (Exercise random). I used batch from
> platform.cmd to do that.
>
> But I dont know if has other way to do more easily.
>
> See my code and give me sugestions please !
>
> https://github.com/Bernardoow/Estudos/blob/master/JS/ELM/
> Effects/random_with_dices.elm
>
> --
> 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.
>

-- 
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.

Reply via email to