4 ms·
I don't know why people keep spreading the misconception that mutation isn't possible in pure languages. ref <- newIORef 0 writeIORef ref 1 y <- re
by pka 10y ago
I don't know why people keep spreading the misconception that mutation isn't possible in pure languages.
ref <- newIORef 0
writeIORef ref 1
y <- readIORef ref
print y
> 1
There you go, mutation in Haskell.