Hi,
First of all, sorry if its in the wrong section..
But I'm just having trouble getting to grips with Haskell. I have my
functional programming exam tommorow and I'm struggling to understand any of
this.
We worked through the book The Craft Of Functional Programming and Im trying
to work my
But after that im lost :(
Is there any general advice? Just keep reading the book till it drills into
my big head?
Is it that you're having difficulty knowing how you'd solve certain classes of
problems using Haskell? You're stuck in an imperative rut?
The O'Reilly book Real World
Hi,
it may be a bit too late for you, but in general working through
Smullyan's To Mock a Mockingbird
(http://en.wikipedia.org/wiki/To_Mock_a_Mockingbird) may help in
coming to grips with some of the theory (and intuition) behind
functional programming.
The Real World Haskell book is also a good
Pretty much yeah.. Im going through the book and things like :
Define a function rangeProduct which when given natural numbers m and n,
returns the product m*(m+1)**(n-1)*n
I got the solution from my lecture notes but I still dont understand it..
rangeProduct :: Int - Int - Int
It may be a bit late but I'll try anything
Thankyou, I'll have a read :-)
Matthias Görgens-2 wrote:
Hi,
it may be a bit too late for you, but in general working through
Smullyan's To Mock a Mockingbird
(http://en.wikipedia.org/wiki/To_Mock_a_Mockingbird) may help in
coming to grips
On Thu, Jan 14, 2010 at 7:52 AM, Ian675 adam_khan_...@hotmail.com wrote:
Is there any general advice? Just keep reading the book till it drills into
my big head?
Also don't be afraid to ask specific questions on the Beginners
mailing list; while Cafe is a good general resource, Beginners is
On Thu, 14 Jan 2010 15:38:26 +0100, Ian675 adam_khan_...@hotmail.com
wrote:
Pretty much yeah.. Im going through the book and things like :
Define a function rangeProduct which when given natural numbers m and n,
returns the product m*(m+1)**(n-1)*n
I got the solution from my lecture
Hello
Does you find this version easier to understand?
rangeProduct :: Int - Int - Int
rangeProduct m n = if m n then 0
else if m == n then m
else m * rangeProduct (m+1) n
I would suspect the main point of the example is
thankyou.. that made more sense to me :)
What im doing now is..
Im still working through the Craft of Functional Programming book but I've
found a site that has solutions to some of the excercise questions. So i'm
noting them down and trying to make sense of them
Is that a good approach?
Yes. An approach that I have always used that has worked well for me is to
keep a list of tricks while I am studying. Whenever I get stuck on a
practice problem but eventually figure it out (either by simply thinking
harder, looking it up, or asking someone for help), I try to identify the
On Jan 15, 2010, at 3:38 AM, Ian675 wrote:
Pretty much yeah.. Im going through the book and things like :
Define a function rangeProduct which when given natural numbers m
and n,
returns the product m*(m+1)**(n-1)*n
Case analysis and recursion.
If m n, the answer is 1 (the product
11 matches
Mail list logo