
Hello, I use Programming in Haskell from Graham Hutton. But I can't find anything in the first 4 chapters from that book why I must use (0,x) en what that means. Roelof ----------------------------------------
Date: Tue, 12 Jul 2011 15:21:46 -0400 Subject: Re: [Haskell-beginners] safetail problem From: amindfv@gmail.com To: rwobben@hotmail.com CC: beginners@haskell.org
_ isn't a value: it's a wildcard character for pattern matching.
Also, if x = [1,2,3], [0,x] is the wrong way to make a list. The right way is (0:x) (":" is "cons")
What resource are you learning from?
On 7/12/11, Roelof Wobben
wrote: Hello,
As a exercise I need to rewrite the tail function into a safetail function by using conditions.
So I made this : http://codepad.org/bKcCUdqy
But as you can see there is a error message.
Can anyone explain me how to solve this ?
Roelof
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners