j
k
j a
j l
newArray_ allocates an array full of garbage.
import Control.Monad.ST import Data.Array.ST import Data.Array tickle :: Int tickle = runST (do { x <- newArray_ (0,100) ; (readArray :: STUArray s Int Int -> Int -> ST s Int) x 3 })
import Control.Monad.ST import Data.Array.ST import Data.Array
tickle :: Int tickle = runST (do { x <- newArray_ (0,100) ; (readArray :: STUArray s Int Int -> Int -> ST s Int) x 3 })
Back to the thread
Back to the list