If $(X, d_x)$ and $(Y, d_y)$ are metric spaces, then the metric on functions from $X$ to $Y$ is often defined as their supermum difference in $Y$. However, this only uses the metric on $Y$.
Can you construct a metric metric on the functions where small changes in both the domain and range result in small changes in the result? To be precise, we could say that
$$f = \lim_{(t_X, t_Y) \to (id_X, id_Y)} t_Y \circ f \circ t_X$$
One way I thought of is somehow comparing the graphs of two functions, but I did not get to far with that (average distance between points?).