Cons 'a' (Cons 'b' (Cons 'c' Nil))

equivalent to

'a' : ('b' : ('c' : []))

using Haskell's normal list type.

-Ross


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 please,
thanks.


--
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 Nabble.com.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to