This seems like a natural thing to have around, but it's not in GHC 6.6...<br><br>newTArrayIO :: (Enum i, Ix i) => (i, i) -> a -> IO (TArray i a)<br>newTArrayIO (a,b) = liftM (TArray . listArray (a,b)) . sequence . zipWith ignore [a..b] . repeat . newTVarIO
<br> where ignore = flip const<br><br>I haven't done any testing with this beyond type checking, but it seems like it could be useful for similar cases to newTVarIO. Has anyone else played with anything similar?<br clear="all">
<br>-- <br><br>Chad Scherrer<br><br>"Time flies like an arrow; fruit flies like a banana" -- Groucho Marx