Modellierung:
import qualified Data.Map as M
newtype Addr = Addr Int
type Store = M.Map Addr Val
newtype Action a =
Action ( Store -> ( Store, a ))
spezifische Aktionen:
new :: Val -> Action Addr get :: Addr -> Action Val put :: Addr -> Val -> Action ()Aktion ausführen, Resultat liefern:
run :: Store -> Action a -> a