[Haskell-cafe] closures with side effects

Bulat Ziganshin bulat.ziganshin at gmail.com
Mon Jun 26 04:11:27 EDT 2006


Hello dkarapet,

Monday, June 26, 2006, 11:32:19 AM, you wrote:

> I have been trying to understand closures in haskell and how they relate
> to side effects. I have been looking around but all I find are trivial
> examples with no side effects. Please let me know if you know of any 
> examples.

what you mean by 'closure'? in Haskell, expression may have a side
effect only if it has "IO a" return type. it is then whole point of
pure lazy language - evaluation of pure (not "IO") expression can be
deferred until it's value really need and language guarantee that this
don't change anything (including lack of any side effects)


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list