[Haskell-cafe] what do I have to do exactlry with this exercises
Sean Leather
sean.leather at gmail.com
Fri Oct 30 06:35:34 UTC 2015
On Fri, Oct 30, 2015 at 8:20 AM, Roelof Wobben wrote:
> Im self studing Haskell with the Craft o ffunctional programmimg of Hutton.
>
> Now I see two exercises that I do not understand what is really the
> purpose here.
>
Maybe a slight rewording of the instructions would help? (It helped me!)
The two exercises are :
>
> 4.21 Given a function f of type Integer -> Integer give a recursive
> definition of a
> function of type Integer -> Integer which on input n returns the maximum
> of the values f 0, f 1, ..., f n. [...]
>
Given:
f :: Integer -> Integer
Define:
g :: Integer -> Integer
g n = ...
such that g is defined recursively. g n returns the maximum of f 0, f 1,
..., f n.
4.22 Given a function f of type Integer -> Integer give a recursive
> definition of
> a function of type Integer -> Bool which on input n returns True if one or
> more of the values f 0, f 1, ..., f n is zero and False otherwise.
>
Try a similar rewording as above.
Regards,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151030/1e52f63e/attachment.html>
More information about the Haskell-Cafe
mailing list