[Haskell-cafe] Mutable arrays

Jeff φ jeff1.61803 at gmail.com
Wed Feb 6 20:17:27 EST 2008

> IO(U)Arrays are only one variant of mutable Array, there are also
> ST(U)Arrays,
> which are often preferred.

I should have worded my question better.  The MArray interface is
implemented in both the ST and IO monad.  A state monad seems like a logical
place for mutable arrays.  However, I don't understand the motivation for
implementing it in IO.  Were mutable arrays added to IO because it would be
difficult to write code that does both IO and manipulates arrays otherwise?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080206/89fd69c1/attachment.htm

More information about the Haskell-Cafe mailing list