Comment on OCaml for HaskellersparentComments−jrockway15yIORef is exactly equivalent to any other mutable variable.If you want to write C in Haskell: import Foreign foo = mallocBytes 42 $ \p -> do whatever <- peek p poke p $ f whatever ...
Comments
IORef is exactly equivalent to any other mutable variable.
If you want to write C in Haskell: