Boek "Functional programming in Clean"

Marcel Kollenaar M.Kollenaar@slo.nl
Tue, 21 Sep 1999 11:04:13 +0100


Hello Pieter and others,

Here some experiences of a newbee. I'm studying Clean by the 
book "Functional programming in Clean". So I first started reading 
and doing the examples between the text lines. But last night I 
made a mistake. I punched in the next program lines. The first two 
lines came from a Clean program listing I was studying and the 
lines following them came from the study book. An experienced 
Cleaner will see my mistake.

module myprog;
import StdEnv;

fac n = prod [1..n]
Start = fac 6

I compiled it and yes there was my first error.

Line 5 [..] <Global-definition> expected instead of '='

It took me a few frustrating hours to find out what I was doing 
wrong. I put the ';' behind lines 1 and 2. So I have a small 
recommandation for the study book for (stupid) people like me.

	Introduce in chapter 1 right in the beginning a part which 
discusses the ';' behind the lines and espacially the first line of the 
module as done in the Technical Language Reference.
	Introduce some examples which causes errors like the one 
above and discuss them. The more the better.
	I know its redundant to write every time the MODULE and 
IMPORT lines before the examples but it makes the student more 
familiar with the build-up and lay-out of a program.

So far my few recommandations and keep studying. It's still a very 
good book.


Marcel Kollenaar

Marcel Kollenaar
Helpdesk tel +31 53 4840400
--------------------------------------------------
Stichting Leerplanontwikkeling
Postbus 2041
7500 CA  Enschede
--------------------------------------------------

Zorg dat je niets in huis hebt dat niet nuttig is of
dat je niet mooi vindt.
                                   - William Morris