[clean-list] Help Please: Beginner to Clean.. Console I/O

RT Happe rthappe at web.de
Wed May 4 00:23:25 MEST 2011


Khurram Khan wrote:

> Now if we consider the example "hello1" from the CleanBook1, chapter 5.1.1
...
>     # (console,world) = stdio world
...
> but I find it hard to understand the meaning of each line of the code.

Your questions are not specific to I/O.  The code snippet quoted above binds the tuple (CONSOLE,WORLD) to the value of STDIO WORLD, or more precisely, the value of STDIO WORLD is a two-part tuple (a pair), and the expression binds the variable CONSOLE to its first part, the variable WORLD to its second part, reusing by the way the variable name WORLD already bound in the outer scope.
[The underscore in (_,CONSOLE) is a don't-care variable: you don't care for its value.]

I'd suggest you read the section on let-before expressions in the language report and come back with your questions.

	http://wiki.clean.cs.ru.nl/Documentation


Best, rt




More information about the clean-list mailing list