Function Domains -Dynamic arrays
Domain Array = Nat A where A is a domain with an error element
newarray: Array An empty array
newarray = ? n.error Maps all of index elements to error
access: Nat x Array ? A Nat used to index array
access(n, r) = r(n) Indexes its array argument r at position n
update: Nat x A x Array ? Array
update(n, v, r) = [n ? v]r Creates a new array that behaves just like r when indexed an any position but n. When indexed at position n, the new array produces the value v.