
That helps IMMENSELY!
I shall see if there is errata on the book's web presence.
Thanks,
Trent.
On Wed, Aug 15, 2018 at 10:22 AM Francesco Ariis
Hello Trent,
On Wed, Aug 15, 2018 at 10:08:29AM -0700, trent shipley wrote:
Also, at this point I am having trouble reading these function declarations.
all :: (a -> Bool) -> [Bool] -> Bool all b ls = and (map b ls)
There must be a typo in the text. The correct signature is
all :: (a -> Bool) -> [a] -> Bool
Which is logical: - we take a list of `a`s (`[a]`) - we pass them through a function `a -> Bool`, obtaining `[Bool]` - we check if the resulting list is all comprised of `True`s.
Does that help? _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners