Encapsulation: The ST Monad
newSTRef :: a -> ST s (STRef s a)
readSTRef :: STRef s a -> ST s a
writeSTRef :: STRef s a -> a -> ST s ()
s ties together the type
of a reference and the
action which uses it.
Föregående bild
Nästa bild
Tillbaka till första bilden
Visa grafisk version