Paul Hudak <[EMAIL PROTECTED]> writes:

> > As you might know, I'm working to find my way through Haskell
> > using School of Expression from Paul Hudak.  I have done all
> > the examples up to chapter 5.  I do think I've learned quite
> > a bit.  But again I'm wondering if this:
> > 
> > makeChange :: Int -> [Int] -> [Int]
> > makeChange 0 (c:coins) = 0:makeChange 0 coins
> > makeChange 0 [] = []
> > makeChange n (coin_val:coins) = 
> >   let (how_many,rest) = divMod n coin_val
> >   in   how_many : makeChange rest coins
> > 
> > could be replaces by some combination of HOFs.  Could someone
> > give me a hand here?
> 
> Without even thinking 
(gosh is it sooo bad ;)


>about whether your program correctly solves
> exercise 5.9, here are two hints on how to use HOF's:  First note that
> divMod 0 n = (0,0).  Then consider using the HOF scan (see page 326).
Isn't that cheating ;-). Anyway thanks for pointing me to that
direction. 

But it's nice to have the chance to say, that this book is IMO very
well done. It's written in style I like very much, the order seems
quite ok for me and the Exercises are solvable and some are quite
interesting and challenging.

In short I have to say I like The Haskell Schools of Expression a bit
more than "The craft of functional programming".

But some critique is still left (regarding Haskell). The programming environments are
not very "beginner" friendly. I have to say that e.g Common Lisp is
thousands of miles ahead. The documentation for the Prelude functions
are IMHO bad too. (BTW they are nearly non-existant). Interfacing to
other programs seems to be weaker too. 

What I found extremly intresting about Haskell is that you get
extremly much done in just a few lines. It's not alway easy to me to
understand such a dense code, but I guess training will help improving
on it. And sometimes the solutions are extremly elegant, even in
comparison to Eiffel (which I know quite well) ;-)

I would really appriciate simular efforts as one can find e.g in
DrScheme for Haskell. DrScheme is IMHO one of the nicest IDEs for
learning Scheme. The online documentation is quite well and the
examples are well choosen. I can imagine that it's not easiy or
honorable to do, but I as a beginner would really appriciate
improvements in that area.


With best regards
Friedrich

-- 
for e-mail reply remove all after .com 

Reply via email to