<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">This part I understand well. <br>
      <br>
      So you could do something like this:<br>
      <br>
      hanoi n 1 2 3 <br>
         | n = 0 -> moves the last disk to the goal peg <br>
         | n != 0 -> moves all the other disk to the spare peg or to
      the  moves n -1 to the goal peg <br>
      <br>
      Roelof<br>
      <br>
      <br>
      <br>
      <br>
      Joel Neely schreef op 17-2-2015 om 17:13:<br>
    </div>
    <blockquote
cite="mid:CAEEzXAhNstcwmDuFcvkve7MDfnr5sH+ka5t55ddD+jJz-1wO=Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small">Regarding
          your last answer...</div>
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small"><br>
        </div>
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small"><span
            style="font-family:arial,sans-serif;font-size:12.8000001907349px">3.
            Only 2 </span><br>
        </div>
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small"><span
            style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br>
          </span></div>
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small">...let me
          suggest a different perspective. If we begin with n disks,
          then:<span
            style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br>
          </span></div>
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small"><br>
        </div>
        <blockquote style="margin:0px 0px 0px
          40px;border:none;padding:0px">
          <div class="gmail_default"
            style="font-family:georgia,serif;font-size:small"><span
              style="font-family:arial,sans-serif;font-size:12.8000001907349px">First
              move everything except the bottom one to the spare peg.</span></div>
        </blockquote>
        <blockquote style="margin:0px 0px 0px
          40px;border:none;padding:0px"><span
            style="font-family:georgia,serif">
            <div class="gmail_default"
              style="font-family:georgia,serif;font-size:small;display:inline"><br>
            </div>
          </span></blockquote>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <blockquote style="margin:0 0 0 40px;border:none;padding:0px"><span
              style="font-family:georgia,serif">
              <div class="gmail_default"
                style="font-family:georgia,serif;font-size:small;display:inline">​
                "everything except the bottom one" refers to </div>
            </span>
            <div class="gmail_default"
              style="font-family:georgia,serif;display:inline">​(</div>
            <span style="font-family:georgia,serif">n</span>
            <div class="gmail_default"
              style="font-family:georgia,serif;display:inline">​ - 1)​</div>
            <span style="font-family:georgia,serif"> disks</span></blockquote>
        </blockquote>
        <blockquote style="margin:0px 0px 0px
          40px;border:none;padding:0px">
          <div class="gmail_default"
            style="font-family:georgia,serif;font-size:small"><span
              style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br>
            </span></div>
          <div class="gmail_default"
            style="font-family:georgia,serif;font-size:small"><span
              style="font-family:arial,sans-serif;font-size:12.8000001907349px">Move
              the bottom one to the goal peg.</span></div>
        </blockquote>
        <font face="georgia, serif">
          <div><font face="georgia, serif"><br>
            </font></div>
        </font>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <blockquote style="margin:0 0 0 40px;border:none;padding:0px"><font
              face="georgia, serif">
              <div class="gmail_default"
                style="font-family:georgia,serif;font-size:small;display:inline">​
                "the bottom one" refers to 1 disk​</div>
            </font></blockquote>
        </blockquote>
        <span style="font-size:12.8000001907349px"><br>
        </span>
        <blockquote style="margin:0px 0px 0px
          40px;border:none;padding:0px">
          <div class="gmail_default"
            style="font-family:georgia,serif;font-size:small"><span
              style="font-family:arial,sans-serif;font-size:12.8000001907349px">Move
              everything else from the spare peg to the goal peg. </span></div>
        </blockquote>
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small"><br>
        </div>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
            <div class="gmail_default"
              style="font-family:georgia,serif;font-size:small">
              <div class="gmail_default" style="display:inline">​
                "everything else" refers to </div>
              <div class="gmail_default" style="display:inline">(</div>
              n
              <div class="gmail_default" style="display:inline">​ - 1)​</div>
               disks</div>
          </blockquote>
        </blockquote>
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small"><br>
        </div>
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small">So that
          moves the thought process toward the "fancier recursion
          pattern" per Doug McIlroy's excellent summary.</div>
        <div class="gmail_default"
          style="font-family:georgia,serif;font-size:small"><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Feb 17, 2015 at 6:23 AM, Roelof
          Wobben <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:r.wobben@home.nl" target="_blank">r.wobben@home.nl</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>Joel Neely schreef op 17-2-2015 om 13:05:<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div class="gmail_extra"><span class="">
                      <div class="gmail_default"
                        style="font-family:georgia,serif;font-size:small">​
                        Let's tweak your answers​ just a bit, calling
                        the three pegs the "source", "goal", and "spare"
                        pegs:</div>
                      <br>
                    </span>
                    <div class="gmail_quote"><span class="">On Tue, Feb
                        17, 2015 at 5:23 AM, Roelof Wobben <span
                          dir="ltr"><<a moz-do-not-send="true"
                            href="mailto:r.wobben@home.nl"
                            target="_blank">r.wobben@home.nl</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote"
                          style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000">- Where
                            do I move the bottom (largest disk) ? <br>
                            <br>
                            To the last peg, which do not contain any
                            disk then
                            <div class="gmail_default"
                              style="font-family:georgia,serif;font-size:small;display:inline">​
                              .</div>
                          </div>
                        </blockquote>
                        <div><br>
                        </div>
                        <div>
                          <div class="gmail_default"
                            style="font-family:georgia,serif;font-size:small;display:inline">From

                            the source peg to the goal peg, which will</div>
                          <span style="font-family:georgia,serif">/must</span>
                          <div class="gmail_default"
                            style="font-family:georgia,serif;display:inline"> not

                            contain any disks.​</div>
                           </div>
                        <blockquote class="gmail_quote"
                          style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000">
                            <div class="gmail_default"
                              style="font-family:georgia,serif;font-size:small;display:inline">​</div>
                            <br>
                            <br>
                            - What must happen before I can move the
                            bottom disk ? <br>
                            <br>
                            I have to move the disk which above that
                            disk. <br>
                          </div>
                        </blockquote>
                        <div><br>
                        </div>
                      </span>
                      <div>
                        <div class="gmail_default"
                          style="font-family:georgia,serif;font-size:small;display:inline">Move

                          everything else from source to sparel peg.​</div>
                         </div>
                      <span class="">
                        <blockquote class="gmail_quote"
                          style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000"> <br>
                            - What must happen after I move the bottom
                            disk ?<br>
                            <br>
                            All the other disk must be placed above that
                            disk. <br>
                          </div>
                        </blockquote>
                        <div><br>
                        </div>
                      </span>
                      <div>
                        <div class="gmail_default"
                          style="font-family:georgia,serif;font-size:small;display:inline">​
                          Move everything else from spare  to goal.​</div>
                         </div>
                    </div>
                    <span class=""> <br>
                      <div class="gmail_default"
                        style="font-family:georgia,serif;font-size:small">​
                        So more questions/hints:</div>
                      <div class="gmail_default"
                        style="font-family:georgia,serif;font-size:small">
                        <ol>
                          <li>How do you fill in the blanks?<br>
                          </li>
                          <li>How do you put the three statements in
                            order?<br>
                          </li>
                          <li>How many disks does each statement talk
                            about?<br>
                          </li>
                        </ol>
                      </div>
                      <div class="gmail_default"
                        style="font-family:georgia,serif;font-size:small"><br>
                      </div>
                      <div class="gmail_default"
                        style="font-family:georgia,serif;font-size:small">-jn-</div>
                      <div class="gmail_default"
                        style="font-family:georgia,serif;font-size:small">​</div>
                    </span></div>
                </div>
              </blockquote>
              <br>
              1. I did already.<br>
              2.     First move everything except the bottom one to the
              spare peg. <br>
                      Move the bottom one to the goal peg. <br>
                      Move everything else from the spare peg to the
              goal peg. <br>
              <br>
              3. Only 2 <br>
              <span class="HOEnZb"><font color="#888888"> <br>
                  Roelof<br>
                  <br>
                  <br>
                </font></span></div>
            <br>
            _______________________________________________<br>
            Beginners mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
            <a moz-do-not-send="true"
              href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners"
              target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature">Beauty of style and harmony and
          grace and good rhythm depend on simplicity. - Plato</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Beginners mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Beginners@haskell.org">Beginners@haskell.org</a>
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>