At 2002-08-11 17:36, Alex Peake wrote:

>I want to implement something like the C idea of:
>n += i
>
>So how does one doe this in Haskell?

  do {
    val <- readIORef n;
    writeIORef n (val + i);
  };


-- 
Ashley Yakeley, Seattle WA

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to