<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Op 11-11-2015 om 14:11 schreef Sumit
      Sahrawat, Maths & Computing, IIT (BHU):<br>
    </div>
    <blockquote
cite="mid:CAJbEW8ORUt=13ODohn1-xfHue_g=m4BteFHJky4sDwo0Q+fr9g@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hint 1) fib n = fib (n - 1) + fib (n - 2), with
        proper base cases
        <div><br>
        </div>
      </div>
    </blockquote>
    <br>
    oke, so use recursion.  No  problem. <br>
    <br>
    <blockquote
cite="mid:CAJbEW8ORUt=13ODohn1-xfHue_g=m4BteFHJky4sDwo0Q+fr9g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hint 2) use mapM_ to print a list of pairs, where the list
          is created by zipping [1..] with the list of fibonacci numbers</div>
      </div>
      <div class="gmail_extra"><br>
      </div>
    </blockquote>
    <br>
    mapM_ is not explained in the first 5 chapters of Craft of
    functional programming,<br>
    <br>
    Can not both or one of the two be done with list comprehension
    because all former exercises uses list comprehension <br>
    <br>
    Roelof<br>
    <br>
    <br>
    <blockquote
cite="mid:CAJbEW8ORUt=13ODohn1-xfHue_g=m4BteFHJky4sDwo0Q+fr9g@mail.gmail.com"
      type="cite">
      <div class="gmail_extra">
        <div class="gmail_quote">On 11 November 2015 at 18:29, 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">Hello,<br>
            <br>
            I have this exercise :<br>
            <br>
            Define a function<br>
            fibTable :: Integer -> String<br>
            which produces a table of Fibonacci numbers. For instance,
            the effect of putStr<br>
            (fibTable 6) should be<br>
            n       fib n<br>
            0        0<br>
            1        1<br>
            2        1<br>
            3        2<br>
            4        3<br>
            5        5<br>
            6        8<br>
            <br>
            <br>
            <br>
            1) Can somone give me any pointers how to calculate the fibb
            numbers with list comprehension.<br>
                I know that the fib numbers are  (n -1) + n<br>
            <br>
            2) Can someone give me any pointers how to write the outcome
            of every run<br>
            <br>
            Roelof<br>
            <br>
            <br>
            _______________________________________________<br>
            Beginners mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
            <a moz-do-not-send="true"
              href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners"
              rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div dir="ltr">
                  <div>Regards</div>
                  <div dir="ltr">
                    <div><br>
                    </div>
                    <div>Sumit Sahrawat</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <p class="" avgcert""="" color="#000000" align="left">Geen virus
        gevonden in dit bericht.<br>
        Gecontroleerd door AVG - <a moz-do-not-send="true"
          href="http://www.avg.com">www.avg.com</a><br>
        Versie: 2015.0.6176 / Virusdatabase: 4460/10979 - datum van
        uitgifte: 11/11/15</p>
    </blockquote>
    <br>
  </body>
</html>