Paul Johnson | 7 Dec 20:01
Picon

Re: IVars

Conal Elliott wrote:
> Oh.  Simple enough.  Thanks.
>
> Another question:  why the IO in readIVar :: IVar a -> IO a, instead 
> of just readIVar :: IVar a -> a?  After all, won't readIVar iv yield 
> the same result (eventually) every time it's called?
Because it won't necessarily yield the same result the next time you run 
it.  This is the same reason the stuff in System.Environment returns 
values in IO.

Paul.

Gmane