[Haskell-beginners] safetail problem

Tom Murphy amindfv at gmail.com
Tue Jul 12 21:21:46 CEST 2011


_ 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 <rwobben at hotmail.com> 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>



More information about the Beginners mailing list