brad clawsie <clawsie <at> fastmail.fm> writes:
>
> hi all
>
> i was wondering if anyone could post some minimal examples on using
> mutable Vectors in the ST monad. i've been digging around in the usual
> places but haven't been able to find anything to get me over the hump
>
> thanks in advance
> brad
>
I was just looking into the same thing. This link at Rosetta Code has
a list shuffling function, which is my first experiment with mutable
Vectors:
http://rosettacode.org/wiki/Balanced_brackets#Haskell
The list is converted to a mutable Vector, the mapM_ performs a series
of element swaps, then the result is frozen and converted back to a
list.
- Globules
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe