<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 30-10-2015 om 08:00 schreef Sean
      Leather:<br>
    </div>
    <blockquote
cite="mid:CACz_ru1YgJsBxezdAzqz58CXRRK1XFtf8oDopDgiaDZuMuf4bg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Fri, Oct 30, 2015 at 8:52 AM,
            Roelof Wobben 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 text="#000000" bgcolor="#FFFFFF">
                <div>Let's say f is a recursive function which
                  calculates the fac. <br>
                </div>
                <br>
                So f 0  = 0 <br>
                f1 = 1<br>
                f2 = 2 <br>
                f3 = 6 <br>
                <br>
                so im my oponion g1 = the answer of f1 which is also the
                max<br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>But recall the problem definition:</div>
            <div><br>
            </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">4.21
                Given a function f of type Integer -> Integer give a
                recursive definition of a<br>
                function of type Integer -> Integer which on input n
                returns the maximum<br>
                of the values f 0, f 1, ..., f n.</blockquote>
              <div><br>
              </div>
            </div>
            <div>It doesn't say anything about f, which means you are
              not allowed to make assumptions about the definition of f.</div>
            <div><br>
            </div>
            <div>f could be defined as:</div>
            <div><br>
            </div>
            <div>  f :: Integer -> Integer</div>
            <div>  f 42 = 100</div>
            <div>  f x  = 0</div>
            <div><br>
            </div>
            <div>Since you don't know anything about f, you must look at
              all values from f 0 to f n in order to find the maximum.</div>
            <div><br>
            </div>
            <div>Regards,</div>
            <div>Sean</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Oke, <br>
    <br>
    Now I see it.<br>
    <br>
    Later on the exercise this is stated. <br>
    <br>
    f 0 = 0 <br>
    f 1 = 44 <br>
    f 2 = 17 <br>
    f _ = 0 <br>
    <br>
    <br>
    So f0  gives 0 , f1 gives 44, f2 till fn gives also 44 <br>
    <br>
    Now I have to think about how to read the values of f 1 .. fn 2 . I
    think I need 2 recursive function . One for g x and one for reading
    f1 or use a list to store f 0  .. f n and then use maximum. <br>
    <br>
    Roelof<br>
    <br>
  </body>
</html>