Newbie: Mutable Arrays

Simon Marlow simonmar@microsoft.com
Thu, 23 Aug 2001 11:40:14 +0100


>  I find two versions of Mutable arrays ie STArray and=20
> IOArray. What is the
> difference between them. Where each of them are supposed to be used?

STArray is for use in the ST monad (see the ST module), and IOArray is
used in the IO monad.  Otherwise, the behaviour is identical.

Also check out MArray for overloaded mutable arrays, which let you
abstract away from the actual monad and use the same function names for
either - they even let you use strict unboxed arrays just by changing
type signatures.

Cheers,
	Simon