[Haskell-cafe] YAHT Question about Exercise 4.8

Bulat Ziganshin bulat.ziganshin at gmail.com
Sat Jul 25 03:16:10 EDT 2009


Hello Futari,

Saturday, July 25, 2009, 10:55:34 AM, you wrote:

> data List a = Nil | Cons a (List a)

this definition says that Nil is a valid list. also it says that
Cons 'a' (xxx) is a valid list as long as xxx is a valid list, so
Cons 'c' (Nil) would be a valid list too. continuing to use second
rule we may get the following: Cons 'a' (Cons 'b' (Cons 'c' (Nil)))


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list