<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 30, 2015 at 8:20 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">Im self studing Haskell with the Craft o ffunctional programmimg of Hutton.<br>
<br>
Now I see two exercises that I do not understand what is really the purpose here.<br></blockquote><div><br></div>Maybe a slight rewording of the instructions would help? (It helped me!)<div><br></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">The two exercises are :<br>
<br>
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. [...]<br></blockquote><div> </div><div>Given:</div><div><br></div><div>  f :: Integer -> Integer</div><div><br></div><div>Define:</div><div><br></div><div>  g :: Integer -> Integer</div><div>  g n = ...</div><div><br></div><div>such that g is defined recursively. g n returns the maximum of f 0, f 1, ..., f n.</div><div><br></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.22 Given a function f of type Integer -> Integer give a recursive definition of<br>
a function of type Integer -> Bool which on input n returns True if one or<br>
more of the values f 0, f 1, ..., f n is zero and False otherwise.<br></blockquote><div><br></div><div>Try a similar rewording as above.</div><div><br></div><div>Regards,</div><div>Sean</div></div></div></div>