[PRL] scope of top-level defines

John Clements clements at brinckerhoff.org
Tue Apr 5 15:22:40 EDT 2005


On Apr 5, 2005, at 2:03 AM, Eli Barzilay wrote:

> On Apr  4, Paul A. Steckler wrote:
>>> Here:
>>>
>>> | mzscheme -t lazy.ss
>>> | Welcome to MzScheme version 209, Copyright (c) 2004 PLT Scheme, 
>>> Inc.
>>> | > (define x (cons 1 y))
>>> | > (define y (cons 2 x))
>>> | > (take 10 x)
>>> | (1 2 1 2 1 2 1 2 1 2)
>>
>> Now see if you can do (pun intended) monadic IO!
>
> I don't have enough experience to do this in a few minutes, and
> there's no reason for it to not be easily doable -- but the whole
> point is that I have the strict world for such things, so why bother?

Because if you use strict constructs in lazy languages, you'll get 
bizarro[*] sequencing.  With monadic I/O, the effects will be observed 
in the same sequence that you would have seen if the program had been 
evaluated in a non-lazy way.  That's the whole point of monadic I/O, 
right?

john

[*] that's a technical term.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2430 bytes
Desc: not available
Url : https://lists.ccs.neu.edu/pipermail/prl/attachments/20050405/bbeb1e5f/smime.bin


More information about the PRL mailing list