  In this work we analyse the functional ${\cal J}(u)=\|\nabla u\|_\infty$
defined on Lipschitz functions with homogeneous Dirichlet boundary conditions.
Our analysis is performed directly on the functional without the need to
approximate with smooth $p$-norms. We prove that its ground states coincide
with multiples of the distance function to the boundary of the domain.
Furthermore, we compute the $L^2$-subdifferential of ${\cal J}$ and
characterize the distance function as unique non-negative eigenfunction of the
subdifferential operator. We also study properties of general eigenfunctions,
in particular their nodal sets. Furthermore, we prove that the distance
function can be computed as asymptotic profile of the gradient flow of ${\cal
J}$ and construct analytic solutions of fast marching type. In addition, we
give a geometric characterization of the extreme points of the unit ball of
${\cal J}$.
  Finally, we transfer many of these results to a discrete version of the
functional defined on a finite weighted graph. Here, we analyze properties of
distance functions on graphs and their gradients. The main difference between
the continuum and discrete setting is that the distance function is not the
unique non-negative eigenfunction on a graph.
