[plt-scheme] Teaching Scheme
Yes it is a bit of a mess, I wonder whether I should consider changing the output format. The Scheme version is actually what I considered originally, but the example code I found all used the one line per door output...
Thanks for trying it out! Thanks to Eli for writing the code! Yay!
Kind regards,
Samuel
On 4/05/2010, at 3:55 AM, Nadeem Abdul Hamid wrote:
>> I'm starting to get the feeling that it isn't possible to print to stdout in Scheme? Is this the case?
>
> I copied the C code example into a file, "test.c" and Eli's code into "test.ss". Opened a terminal and:
>
> --- The C version:
>
> $ gcc -o test.exe test.c
> $ ./test.exe
> Door #1 is open..
> ....
> ... (a long mess of 100 lines of output, more than can fit on the screen at a time without scrolling)
> ....
>
>
>
> --- The PLT-Scheme version:
>
> $ mzscheme test.ss
> (1 4 9 16 25 36 49 64 81 100)
>
>
>
>
> nadeem
>