Newbie ST/Monad Question
Fri, 24 Aug 2001 11:28:56 -0600
Dear Haskell Hackers,
Please forgive me if I've sent this is the wrong mailing list.
I'm writing a simple union/find implementation using the ST library,
but I've run into some kind of conceptual problem that I've been able
to isolate in the following:
three :: Int
three = runST (do v<-newSTRef 0
writeSTRef v 3
main = print (three*3)
when this is compiled and run using ghc, it prints
what need I do to make it print 6?