Andy Georges wrote:
Hi Kaoru,
I have been working through the exercises in Thompson's The Craft of
Functional Programming 2nd Ed book. I am looking for a solution web
site for Thompson's book. Or maybe the people here can help.
In exercise 4.4, I am asked to define a function
howManyOfFourEqual
Kaoru Hosokawa ([EMAIL PROTECTED]) wrote:
I hope to find a better solution. I googled but couldn't find the
answer.
Here is what I have. I do not have working Haskell interpreter at
the moment (being on amd64), but this is what I have in my archive:
weakAscendingOrder :: Int - Int - Int -
I had a go with things along this theme and came up with a couple of
options, with different type signatures. I use some functions from the
Data.List library.
If we know that, as with Ints, we are dealing with list members that are
instances of Ord, we can do:
howManyEqual :: (Eq a, Ord a) = [a]
Hi all,
when this example occurs in the text the new Haskell coder has not been
introduced to most of what you suggest.
I didn't realise that. All apologies.
mvg,
Andy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
I have been working through the exercises in Thompson's The Craft of
Functional Programming 2nd Ed book. I am looking for a solution web
site for Thompson's book. Or maybe the people here can help.
In exercise 4.4, I am asked to define a function
howManyOfFourEqual :: Int - Int - Int -
Hi Kaoru,
I have been working through the exercises in Thompson's The Craft of
Functional Programming 2nd Ed book. I am looking for a solution web
site for Thompson's book. Or maybe the people here can help.
In exercise 4.4, I am asked to define a function
howManyOfFourEqual :: Int - Int