[Haskell-cafe] YAHT Question about Exercise 4.8
rmm-haskell at z.odi.ac
Sat Jul 25 03:00:16 EDT 2009
Cons 'a' (Cons 'b' (Cons 'c' Nil))
'a' : ('b' : ('c' : ))
using Haskell's normal list type.
On Jul 25, 2009, at 2:55 AM, Futari wrote:
> Hi, I was trying to use the solution given, but I don't know how to
> use it...
> How do I create something that is of type List?
> data List a = Nil | Cons a (List a)
>> From the previous examples, I was thinking something like Cons 'a'
>> 'b' 'c'
> would create a list ['a','b','c'] but it gave me errors... help
> View this message in context: http://www.nabble.com/YAHT-Question-about-Exercise-4.8-tp24655087p24655087.html
> Sent from the Haskell - Haskell-Cafe mailing list archive at
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe