import Data.IORef main = do xs <- newIORef [] modifyIORef xs (1:) modifyIORef xs (2:) xs <- readIORef xs print xs
Standard input is empty
[2,1]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!