title: How do I add a second die to this elm effects example?
body: <p>I am new to Elm and have been looking at the following example (note this is under the newer 0.17 architecture, where Action is now Command):
  <a href="http://elm-lang.org/examples/random" rel="noreferrer">http://elm-lang.org/examples/random</a></p>
  
  <p>There is a follow up challenge to add a second die to the example, so that a single click of the button rolls a new value for each die.  My idea is to change the model to hold two separate values, one for each die, ala</p>
  
  <pre><code>type alias Model =
         { dieFace1 : Int
         , dieFace2 : Int
         }
  </code></pre>
  
  <p>This works fine until I get to the update block.  I am not sure how to update the Random number generator to create two values.  The function is a bit confusing to me.</p>
  
  <pre><code>type Msg
    = Roll
    | NewFace Int Int
  
  
  update : Msg -&gt; Model -&gt; (Model, Cmd Msg)
  update msg model =
    case msg of
      Roll -&gt;
        **(model, Random.generate NewFace (Random.int 1 6))** &lt;-- not sure what to do here
  
      NewFace newFace1 newFace2 -&gt;
        (Model newFace1 newFace2, Cmd.none)
  </code></pre>
  
  <p>The documentation for the Random.generate function is a bit light - </p>
  
  <blockquote>
    <p>generate : (a -> msg) -> Generator a -> Cmd msg</p>
    
    <p>Create a command that will generate random values.</p>
  </blockquote>
  
  <p>Is this even the correct approach to handle two dice, or is there a better way?  I am an elm noob, please be nice :)</p>