mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 10:41:59 +03:00
a972778eab
They don't all pass yet, for minor reasons. Coming shortly... Unfortunately the startup overhead for chez is really noticeable here!
17 lines
332 B
Idris
17 lines
332 B
Idris
import Data.IORef
|
|
|
|
main : IO ()
|
|
main
|
|
= do x <- newIORef 42
|
|
let y = x
|
|
writeIORef y 94
|
|
val <- readIORef x
|
|
printLn val
|
|
val <- readIORef y
|
|
printLn val
|
|
modifyIORef x (* 2)
|
|
val <- readIORef x
|
|
printLn val
|
|
val <- readIORef y
|
|
printLn val
|