How to define the statistical distance between two functions?
It can be seen that statistical difference is equivalent to computational difference if a PPT algorithm is replaced by a computationally unbounded one, i.e. an arbitrary function. For distributions of random variables, if $A(1^l,s)=1$ when $\Pr[X_l=s]&gt;\Pr[Y_l=s]$ and $A(1^l,s)=0$ otherwise, then $d_A^{\mathbf X,\mathbf Y}(l)=d^{\mathbf X,\mathbf Y}(l)$, and this is the maximum for any $A$.

For functions, a similar argument can be used: a computationally unbounded algorithm can return $1$ on an arbitrary subset of functions, so it seems that the best choice would be to return $1$ for such $f$ that $\Pr[F_l=f]&gt;\Pr[G_l=f]$. Then,
$$d^{\mathbf F,\mathbf G}(l)=d_A^{\mathbf F,\mathbf G}(l)=\frac12\sum\limits_f\lvert\Pr[F_l=f]-\Pr[G_l=f]\rvert.$$
Here, the sum is taken over all possible functions. This sum well-defined, because all summands are nonnegative.