
15 Aug
2018
15 Aug
'18
5:22 p.m.
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?