Speicher

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



Johannes Waldmann 2012-01-30