[clean-list] questions about Clean learning

Jigang Sun js035288 at student.paisley.ac.uk
Mon Jul 18 15:29:17 MEST 2005


Hi,

I have questions about Clean learning. Would anyone help?

On page 95 of Clean textbook, section 4.1.5 Type constructor classes, I do not understand the data structure of "::Tree a = Node a [Tree a]". Would anyone please give an instance of it.

Also, I could not find an explanation for "Just" and "Nothing" in "::MayBe a =Just a| Nothing".

On page 96, section 4.2 Existential types, ::List a = Cons a (List a) | Nil, "Cons" and "Nil" seems to be a keyword, but with no explanations. Can anyone give an example for the structure?

Do anyone know whether there are sample answers to exercises on the Clean Book?

Regards

Jigang





More information about the clean-list mailing list