
24 Aug
2001
24 Aug
'01
1:44 p.m.
Fri, 24 Aug 2001 11:28:56 -0600, Carl McTague
import ST
three :: Int three = runST (do v<-newSTRef 0 writeSTRef v 3 readSTRef v)
main = print (three*3)
when this is compiled and run using ghc, it prints
carl@exp(monad) ./a.out <<ST action>>
Are you sure? It prints 9 for me.
what need I do to make it print 6?
Change one of 3's to 2 :-) -- __("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTÊPCZA QRCZAK