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 ()
The encapsulation function:
runST :: (forall s . ST s a) -> a
Result type
free from ST:
“pure”.
Föregående bild
Nästa bild
Tillbaka till första bilden
Visa grafisk version