Use an ordered tree to store a function whose domain is a finite subset of T and whose range is some set U. The operations are: find the value of the function for a given argument; change this value; delete an element from the domain; and add an element to the domain (the value is also provided).
We represent the domain using an ordered tree and add one more array
func_val: array [1 . . n] of U;
If val[x] = t and func_val[x] = u, then the function value on t equals u.