Advertisement
NLinker

STArray error example

Jul 30th, 2017
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. newSTArray :: Ix i => (i, i) -> e -> ST s (STArray s i e)
  2. newSTArray = newArray
  3.  
  4. test :: String
  5. test = runST $ do
  6.   array <- newSTArray (0, 10 :: Int) (0 :: Int)
  7.   b <- readArray array 11
  8.   return $ show b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement