Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/tests/conformance98/IOExtras/IOArray/Main.hs
import NHC.IOExtras main = do a <- newIOArray (0,5) 4 showIOArray a writeIOArray a 3 3 showIOArray a showIOArray a = do putStr "[" mapM_ (\i-> do v <- readIOArray a i putStr (show v++",")) [0..5] putStrLn "]"