Set: T, D,R -> T
(* for an f in T and an x in D, assigns value of y in R to f(x) *)
Access: T, D -> R
(* returns the value of f(x) *)
Init: -> T (* returns the constant function with all values d *)
Access (Set(f,x,y), z) := if x=z then y else Access(f,z)
(* retrieve default unless previously set *)
Access (Init,x) := d (* obviously *)
Set(Set(f,x,y),u,v) := if x=u then Set(f,x,v) else Set(Set(f,u,v),x,y)
(* only the most recent assignment for a given domain element is relevant *)