19 Aug
2007
19 Aug
'07
2:52 p.m.
I have an IOArray, but it doesn't work the way I expected it to. I defined newMem s = newIOArray (0, size-1) 0 and then x = newMem 30 then do { y <- x ; v <- readIOArray y 2 ; print v ; writeIOArray y 2 20 ; v <- readIOArray y 2 ; print v } this resulted in 0, 2 as expected. however, then do { y <- x ; v <- readIOArray y 20 ; print v } results in 0 I thought the IOArray was basically a static structure? Thanks